rainbowkit icon indicating copy to clipboard operation
rainbowkit copied to clipboard

Update MetaMask connector

Open DanielSinclair opened this issue 7 months ago • 3 comments

Summary

  • restore MetaMask connector id
  • keep existing QR code logic while using wagmi MetaMask connector
  • update wallet button tests

Testing

  • pnpm lint
  • pnpm 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 createConnector and metaMask from wagmi.
  • Removed the extensive isMetaMask function for checking MetaMask compatibility.
  • Updated the getUri function to simplify URI handling for MetaMask mobile.
  • Changed shouldUseWalletConnect to shouldUseQRCode for clarity.
  • Modified the installed property logic for determining wallet installation.
  • Updated the createConnector method to utilize wagmi's metaMask connector, including a custom getChainId implementation.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

DanielSinclair avatar Jun 05 '25 05:06 DanielSinclair

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

vercel[bot] avatar Jun 05 '25 05:06 vercel[bot]

🦋 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

changeset-bot[bot] avatar Jun 05 '25 05:06 changeset-bot[bot]

This currently blocked due to the connector's URI length that cannot be rendered as a qr code

DanielSinclair avatar Jun 05 '25 16:06 DanielSinclair