rainbowkit
rainbowkit copied to clipboard
[bug] After connecting a wallet using the WalletConnect QR code, the wallet disconnection is not functioning properly.
Is there an existing issue for this?
- [X] I have searched the existing issues
RainbowKit Version
2.0.2
wagmi Version
2.5.11
Current Behavior
After connecting the wallet via QR code, if the page is refreshed, the wallet connection is maintained. However, when attempting to disconnect the wallet at this point, the wallet disconnection does not work for some reason.
https://github.com/rainbow-me/rainbowkit/assets/121843393/539eefa3-893d-44a5-aa89-231ca3a39ba9
- 11 seconds: Wallet is connected
- 16 seconds: Page is refreshed
- 20 seconds: Request to disconnect wallet (no response)
- 24 seconds: Another request to disconnect wallet (no response)
- 28 seconds: Another request to disconnect wallet (wallet finally disconnects)
Expected Behavior
The wallet disconnection is expected on the first request to disconnect the wallet.
Steps To Reproduce
https://www.rainbowkit.com/docs/introduction
- Connect wallet using QR code through WalletConnect or MetaMask.
- Refresh the page.
- Request to disconnect the wallet.
- The wallet is not disconnected.
- After requesting to disconnect multiple times, it finally disconnects.
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
When observing the connection state using the useConnections hook from wagmi, an interesting situation can be identified.
Initially, after connecting the wallet, there is only one connection in the connections array. However, after refreshing the page and inspecting it again, the connections array now contains two connections.