-
Notifications
You must be signed in to change notification settings - Fork 646
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
[bug] <Connect button state not updating after metamask disconnect> #807
Comments
I am also having this issue with RainbowKit version: 0.7.2. It works fine after reverting to 0.5.3 since I tried every version before @latest to find the last working version.
Edit - Added code below File: App.tsx
File: fileWithConnect.tsx
|
After messing around with Custom wallet and walletlist I found that the issue might be the
|
I'm having this issue as well. I've created a Loom video recording to illustrate this issue along with an associated small repo available for checkout. Please let me know if I can help further, happy to do so :) |
bump this issue also happens on rainbow custom auth plugin after reading this, pretty sure the core issue is with rainbowkit itself. |
It happens on https://www.rainbowkit.com/ as well. When you disconnect the wallet and refresh it, it is still connected. Have to go to metamask to disconnect. |
Suspect this is because the |
known issue with MetaMask |
Had the same issue, was resolved for me with rainbow 8.x version. Sadly I still couldn't use it then because it has a few other major bugs that have yet to be resolved |
🍍 |
Ok so for this, whenever you refresh while it's connected, the wallet disconnects as well. So it's not really a viable solution. |
Yeah, Exactly @terrytjw |
still not fixed. |
This error has gone after add shimDisconnect to true. Aka: |
wow, great. thanks @natrixofficial |
This issue is related to metamask. It does not allows to change the connect state. MetamaskWallet connector on wagmi has a way to manage it by keeping track of users actions locally:
This issue is NOT related to Rainbowkit and should be closed. |
Due to a bug in wagmi you need to make sure all of the connectors that you use that are either InjectedConnector or extend InjectedConnector have shimDisconnect set to true. For the default set of connectors that RainbowKit uses (from getDefaultWallets) those are: metaMaskWallet, injectedWallet and braveWallet. |
not the best option but clearing the localstorage helps - though it should just work irrespective of if the issue is with wagmi or metamask or whatever. |
I've fixed it like this:
Hope it helps you |
The following localStorage attributes will help disconnect from the MetaMask wallet on disconnect:
Hope it helps |
@balajipdm These localstorage keys are actually handled by Wagmi internally, so there shouldn't be a need to adjust them. |
Is there an existing issue for this?
RainbowKit Version
0.7.1
wagmi Version
0.6.8
Current Behavior
In a certain case scenario when disconnecting from metamask it still shows my address and balance in the connect button.
Expected Behavior
it should just show the connect wallet button
Steps To Reproduce
1.connect with metamask.
2.disconnect with the account modal.
3.close the web browser (in my case i used chrome).
4.open and connect again with metamask.
5.now disconnect using metamask and it will still show all the account data in the connect button.
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: