Skip to content

Commit

Permalink
chore: support for wagmi 1.3.x and viem 1.1.x (#1328)
Browse files Browse the repository at this point in the history
* chore: wagmi ~1.3.0 peer support

* chore: upgraded viem to ~1.1.8

* chore: upgrade wagmi to ~1.3.2

* fix: transaction receipt status type

* chore: changesets
  • Loading branch information
DanielSinclair committed Jun 28, 2023
1 parent edc8121 commit 6d361b4
Show file tree
Hide file tree
Showing 19 changed files with 153 additions and 182 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-clocks-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rainbow-me/rainbowkit': patch
---

Support for wagmi `1.3.x` and viem `1.1.x` peer dependencies.
5 changes: 5 additions & 0 deletions .changeset/swift-geese-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rainbow-me/create-rainbowkit': patch
---

Updated `wagmi` to `~1.3.0` and `viem` to `~1.1.0`.
4 changes: 2 additions & 2 deletions examples/with-create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"react": "^18.2.0",
"typescript": "^5.0.4",
"util": "0.12.4",
"viem": "~1.0.6",
"wagmi": "~1.2.1",
"viem": "~1.1.8",
"wagmi": "~1.3.2",
"web-vitals": "^2.1.4",
"buffer": "npm:buffer@6.0.3"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"next": "^13.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/node": "^18.16.12",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next-custom-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"next": "^13.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/node": "^18.16.12",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next-mint-nft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"next": "^13.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/node": "^18.16.12",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next-siwe-iron-session/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"siwe": "^2.1.4",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/node": "^18.16.12",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next-siwe-next-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"siwe": "^2.1.4",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/node": "^18.16.12",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"next": "^13.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/node": "^18.16.12",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"buffer-polyfill": "npm:buffer@^6.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@remix-run/dev": "^1.5.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"buffer": "^6.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/react": "^18.2.6",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@typescript-eslint/parser": "^5.5.0",
"@vanilla-extract/esbuild-plugin": "^2.2.0",
"@vanilla-extract/vite-plugin": "^3.8.0",
"@wagmi/core": "~1.2.1",
"@wagmi/core": "~1.3.2",
"autoprefixer": "^10.4.0",
"esbuild": "^0.14.39",
"eslint": "7.32.0",
Expand All @@ -79,8 +79,8 @@
"typescript": "^5.0.4",
"vitest": "^0.30.0",
"ethers": "^5.6.8",
"wagmi": "~1.2.1",
"viem": "~1.0.6"
"wagmi": "~1.3.2",
"viem": "~1.1.8"
},
"pnpm": {
"onlyBuiltDependencies": [
Expand Down
4 changes: 2 additions & 2 deletions packages/create-rainbowkit/generated-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"next": "^13.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/node": "^18.16.12",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-rainbowkit/templates/next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"next": "^13.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"devDependencies": {
"@types/node": "^18.16.12",
Expand Down
4 changes: 2 additions & 2 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"siwe": "^2.1.4",
"viem": "~1.0.6",
"wagmi": "~1.2.1"
"viem": "~1.1.8",
"wagmi": "~1.3.2"
},
"scripts": {
"dev": "next dev",
Expand Down
6 changes: 3 additions & 3 deletions packages/rainbowkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
"react": ">=17",
"react-dom": ">=17",
"viem": "~0.3.19 || ^1.0.0",
"wagmi": "~1.0.1 || ~1.1.0 || ~1.2.0"
"wagmi": "~1.0.1 || ~1.1.0 || ~1.2.0 || ~1.3.0"
},
"devDependencies": {
"@types/qrcode": "^1.4.2",
"@vanilla-extract/private": "^1.0.3",
"@vanilla-extract/css-utils": "0.1.2",
"autoprefixer": "^10.4.0",
"viem": "~1.0.6",
"wagmi": "~1.2.1",
"viem": "~1.1.8",
"wagmi": "~1.3.2",
"nock": "^13.2.4",
"postcss": "^8.4.4",
"react": "^18.2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/rainbowkit/src/transactions/transactionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ export function createTransactionStore({
account,
chainId,
hash,
status === 0 ? 'failed' : 'confirmed'
// @ts-ignore - types changed with viem@1.1.0
status === 0 || status === 'reverted' ? 'failed' : 'confirmed'
);
});

Expand Down
Loading

2 comments on commit 6d361b4

@vercel
Copy link

@vercel vercel bot commented on 6d361b4 Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 6d361b4 Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.