Skip to content

Commit

Permalink
feat: coinbase smart wallet support (#1964)
Browse files Browse the repository at this point in the history
* Revert "chore: replace wagmi `coinbaseWallet` with custom connector (#1945)"

This reverts commit 515498f.

* chore: upgrade wagmi

* chore: remove eventemitter3

* chore: upgrade pnpm

* fix: ignore config types temporarily

* chore: upgrade viem

* fix: ignore chain types temporarily

* feat: coinbase v4 sdk resolution override

* fix: missing window type

* chore: upgrade to wagmi 2.7.1

* chore: upgrade to viem 2.9.31

* fix: remove headless mode param

* fix: temporary ignore window.ethereum type errors

* chore: upgrade to v4 rc2

* chore: upgrade to coinbase sdk v4 rc 3

* chore: upgrade wagmi, viem

* chore: fix build errors

* chore: update pnpm-lock.yaml file

* chore: type cast window ethereum provider

* chore: drop to wallet-sdk beta 14 over rc

* chore: absorb coinbase connector changes

* chore: coinbaseWallet installed to always be true

* chore: upgrade pnpm

* chore: make @wagmi/core a dev depen

* chore: upgrade wagmi, viem

* chore: adopt wagmi cb connector

* chore: fix viem version

* chore: upgrade viem and tweak coinbaseWallet

* chore: downgrade viem to 2.9.31

* fix: lock wagmi version to 2.9 and above

* chore: ignore unknown failed tests

* chore: create-rainbowkit template changeset

* chore: changeset

* chore: tweak changeset

---------

Co-authored-by: Daniel Sinclair <d@niel.nyc>
  • Loading branch information
magiziz and DanielSinclair committed May 18, 2024
1 parent 7b44406 commit 82153ed
Show file tree
Hide file tree
Showing 30 changed files with 434 additions and 795 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-shrimps-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rainbow-me/create-rainbowkit": patch
---

Upgraded wagmi to `^2.9.2` and viem to `2.9.31`. The viem version now statically reflects the version most compatible with wagmi.
13 changes: 13 additions & 0 deletions .changeset/warm-impalas-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@rainbow-me/rainbowkit": minor
---

Upgraded compatible `wagmi` and `@coinbase/wallet-sdk` versions to support [Coinbase Smart Wallet](https://www.smartwallet.dev/why).

Smart Wallet enables users to create a new wallet in seconds with Passkeys, without installing an app or extension. Smart Wallet users can use the same account and address across all onchain apps with RainbowKit.

Smart Wallet and the underlying smart contract is fully compatible with Wagmi, but dApps need to ensure that their offchain signature validation is [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492) compliant to support smart contract wallets. Follow [this guide](https://www.smartwallet.dev/guides/signature-verification) for more information.

Smart Wallet is currently only available for testnets while using RainbowKit in a local development environment. Support for Mainnet and full production rollout will occur automatically later this month.

Coinbase Wallet users on desktop and mobile will now interact with a new connection flow in RainbowKit alongside Smart Wallet.
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.3.0",
"typescript": "5.4.2",
"util": "0.12.4",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4",
"web-vitals": "^2.1.4",
"buffer": "npm:buffer@6.0.3"
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next-app-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"next-intl": "^3.9.4",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
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": "^14.2.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
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": "^14.2.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
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": "^14.2.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next-rainbow-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"next": "^14.2.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
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.3.0",
"react-dom": "^18.3.0",
"siwe": "^2.1.4",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
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.3.0",
"react-dom": "^18.3.0",
"siwe": "^2.1.4",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/with-next-wallet-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"next": "^14.2.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
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": "^14.2.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
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 @@ -15,8 +15,8 @@
"@remix-run/serve": "^2.7.2",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
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 @@ -13,8 +13,8 @@
"buffer": "^6.0.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11",
"viem": "2.9.31",
"wagmi": "^2.9.2",
"@tanstack/react-query": "^5.28.4"
},
"devDependencies": {
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"esbuild": "^0.20.2",
"esbuild-plugin-replace": "^1.4.0",
"ethers": "^5.6.8",
"eventemitter3": "^5.0.1",
"husky": "^8.0.3",
"jsdom": "^23.0.1",
"lokijs": "^1.5.12",
Expand All @@ -72,11 +71,11 @@
"react-dom": "^18.3.0",
"recursive-readdir-files": "^2.3.1",
"typescript": "5.4.2",
"viem": "^2.8.12",
"viem": "2.9.31",
"vitest": "^0.33.0",
"wagmi": "^2.5.11"
"wagmi": "^2.9.2"
},
"packageManager": "pnpm@9.1.0",
"packageManager": "pnpm@9.1.1",
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
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 @@ -14,8 +14,8 @@
"next": "^14.2.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11"
"viem": "2.9.31",
"wagmi": "^2.9.2"
},
"devDependencies": {
"@types/node": "^18.19.3",
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 @@ -14,8 +14,8 @@
"next": "^14.2.3",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"viem": "^2.8.12",
"wagmi": "^2.5.11"
"viem": "2.9.31",
"wagmi": "^2.9.2"
},
"devDependencies": {
"@types/node": "^18.19.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"react": "^18.3.0",
"react-dom": "^18.3.0",
"siwe": "^2.1.4",
"viem": "^2.8.12",
"wagmi": "^2.5.11"
"viem": "2.9.31",
"wagmi": "^2.9.2"
},
"scripts": {
"dev": "next dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/rainbow-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"react": ">=18",
"react-dom": ">=18",
"viem": "2.x",
"wagmi": "2.x"
"wagmi": "^2.9.0"
},
"repository": {
"type": "git",
Expand Down
3 changes: 1 addition & 2 deletions packages/rainbowkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"react": ">=18",
"react-dom": ">=18",
"viem": "2.x",
"wagmi": "2.x"
"wagmi": "^2.9.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.2.0",
Expand All @@ -64,7 +64,6 @@
"vitest": "^0.33.0"
},
"dependencies": {
"@coinbase/wallet-sdk": "3.9.3",
"@vanilla-extract/css": "1.14.0",
"@vanilla-extract/dynamic": "2.1.0",
"@vanilla-extract/sprinkles": "1.6.1",
Expand Down
19 changes: 0 additions & 19 deletions packages/rainbowkit/src/connectors/coinbaseWallet.test.ts

This file was deleted.

Loading

0 comments on commit 82153ed

Please sign in to comment.