-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: walletconnect v2 support #1003
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Socket Security Pull Request ReportDependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again. 📜 Install scriptsInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts. Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.
Pull request report summary
Bot CommandsTo ignore an alert, reply with a comment starting with
Powered by socket.dev |
}) { | ||
const options: WalletConnectConnectorOptions = { | ||
chains, | ||
options: { | ||
projectId: | ||
projectId || | ||
(process.env.WALLETCONNECT_PROJECT_ID as string) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this might break in environments that don't inject process.env
vars (e.g. Vite).
You'll likely need to also update which events you listen to for Listening on provider itself is suggested, as you can utilise |
Hey, first of all, thanks for all the work w/ rainbowkit and in this PR. I just wanted to check if rainbowkit depends on this PR to start supporting WalletConnect v2, or if it's already supported and this is just some sort of improvement/update to a newer version. Just wondering about the impact of WalletConnect sunsetting v1 to rainbowkit and if the current 0.8.1 already has support for WC v2. Thanks |
@fodisi WalletConnect v2 is not currently supported. There are bugs and differences in the underlying UniversalConnector that we are working through with WalletConnect |
thanks a lot for the quick reply, @DanielSinclair ! |
@fodisi @DanielSinclair hey folks, sorry if this is a very silly question but there is something that is not that clear to me.
Will it affect, for example, Metamask wallet? I'm asking because I've seen some internal code that uses walletconnect for mobile etc etc. |
@adrianotadao Yes, each wallet will be affected and will need to migrate to WalletConnect v2. For RainbowKit, we will migrate each of these wallet connectors to v2 as the support becomes available. MetaMask currently hasn't released support, and other wallets are facing migration issues which we hope will soon be resolved. We will also leave a |
Hey @DanielSinclair, thank you for answering my question! I still have more questions =D
Does it mean that my app that relies on Metamask connection will break and I won't have any authentication system at all? 😱 |
@adrianotadao Correct. But, those teams are also working with WalletConnect, so I would assume WalletConnect won't deprecate v1 until they have migrated. |
Thanks for the great work 🙌 Would it be possible to have a beta version of this? Would love to test. Also, on the example, the WalletConnect option on wallet, does not generate any QR |
@obernardovieira The WalletConnect team is still working on getting fixes into Wagmi, but we'll update this PR when those changes are settled. |
Hi folks, any tips on which version to use instead while this is in progress? The rainbowkit homepage says EDIT: Looks like |
Hi @DanielSinclair |
@fodisi We will start to migrate a set of wallets to WalletConnect v2 in a patch release very soon, and will complete migrating all RainbowKit connectors by June 14th. dApps will need to update RainbowKit on this timeframe. The RainbowKit 0.12.x API is already WalletConnect v2 compatible, but the wallet connectors have not yet been migrated (as some have unstable support for v2, and we want them to hit a better UX bar). It is recommended that you begin to migrate your dApp to RainbowKit v1 and Wagmi v1, but we will also cherry-pick full WalletConnect v2 support as RainbowKit 0.12.15 on June 14th to make it easier to adopt for dApps that have not yet migrated. The only breaking change specific to WalletConnect v2 that you will need to consider is that dApps must not create a const projectId = 'YOUR_PROJECT_ID';
const { wallets } = getDefaultWallets({
appName: 'My RainbowKit App',
projectId,
chains,
});
const connectors = connectorsForWallets([
...wallets,
{
groupName: 'Other',
wallets: [
argentWallet({ projectId, chains }),
trustWallet({ projectId, chains }),
ledgerWallet({ projectId, chains }),
],
},
]); |
@DanielSinclair Thanks a lot for all the info about the migration plan, schedule and references 🙏 |
version
andproviderId
to WalletConnector connector APIWALLETCONNECT_PROVIDER_ID
andNEXT_PUBLIC_WALLETCONNECT_PROVIDER_ID
envs