Update MetaMask connector
Summary
- restore MetaMask connector id
- keep existing QR code logic while using wagmi MetaMask connector
- update wallet button tests
Testing
pnpm lintpnpm test
https://chatgpt.com/codex/tasks/task_e_6840dcfc2aec8325a84889c10b1337b8
PR-Codex overview
This PR refactors the metaMaskWallet implementation to utilize the wagmi library for creating connectors, streamlining the integration with MetaMask and enhancing mobile deep linking capabilities. It also simplifies the logic for determining whether MetaMask is injected.
Detailed summary
- Replaced the old import statements with
createConnectorandmetaMaskfromwagmi. - Removed the extensive
isMetaMaskfunction for checking MetaMask compatibility. - Updated the
getUrifunction to simplify URI handling for MetaMask mobile. - Changed
shouldUseWalletConnecttoshouldUseQRCodefor clarity. - Modified the
installedproperty logic for determining wallet installation. - Updated the
createConnectormethod to utilizewagmi'smetaMaskconnector, including a customgetChainIdimplementation.
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| rainbowkit-example | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 18, 2025 4:55am |
| rainbowkit-site | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 18, 2025 4:55am |
🦋 Changeset detected
Latest commit: f1948bb87c55327ea3773d146608f38d83ab23bf
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 18 packages
| Name | Type |
|---|---|
| @rainbow-me/rainbowkit | Patch |
| example | Patch |
| @rainbow-me/rainbow-button | Patch |
| rainbowkit-next-app | Patch |
| site | Patch |
| with-create-react-app | Patch |
| with-next-app-i18n | Patch |
| with-next-app | Patch |
| with-next-custom-button | Patch |
| with-next-mint-nft | Patch |
| with-next-siwe-iron-session | Patch |
| with-next-siwe-next-auth | Patch |
| with-next-wallet-button | Patch |
| with-next | Patch |
| with-react-router | Patch |
| with-remix | Patch |
| with-vite | Patch |
| with-next-rainbow-button | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
This currently blocked due to the connector's URI length that cannot be rendered as a qr code