-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Infinite event loop when using an 'injected' connector for metamask with the Coinbase wallet extension enabled #4487
Comments
We might be experiencing something similar. Can you link to the piece of code in Cb Wallet that emits connect on requests? |
@hubagaspar91 Unfortunately I couldn't find the source for the coinbase extension on Github, except for one quite outdated version that someone unminified, but it doesn't contain the code in question. I looked at the code in Chrome devtools, the file is under Coinbase Wallet extension => requestProvider.js, the last line of the registerProviders function, which is called when getAccounts is called.
|
See here for a sample app to reproduce. |
Check existing issues
Describe the bug
Not sure if this can be addressed in Wagmi or if the bug is with Coinbase.
Conditions:
Behaviour:
When the react WagmiProvider tries to initialize, the browser tab completely locks up and crashes.
Analysis of infinite loop:
I have attached screenshots showing the loop.
Wagmi + Coinbase + Metamask infinite loop.pdf
I think the issue may be with Coinbase, because it seems to me that it shouldn't be emitting "connect" events on every request after the provider has already been registered / connected. But I'm posting here too to see if anyone else has come across this issue / has any insights.
Link to Minimal Reproducible Example
No response
Steps To Reproduce
No response
What Wagmi package(s) are you using?
wagmi, @wagmi/connectors, @wagmi/core
Wagmi Package(s) Version(s)
[email protected]
Viem Version
2.19.6
TypeScript Version
5.7.2
Anything else?
This is a React app, using Rainbowkit with Wagmi.
The text was updated successfully, but these errors were encountered: