Open futantan opened 1 month ago
Wagmi supports multiple wallet connections at once by default.
It will also reconnect on mount to multiple wallets which you've connected before. You can set reconnectOnMount
to false
in <WagmiProvider>
. Check out the docs for reference here https://wagmi.sh/react/api/WagmiProvider#reconnectonmount
hi @magiziz thanks for your suggestion, but this won't fix the issue, and this is not the expected behavior.
because once we add reconnectOnMount
to false
, when we connect to Metamask and refresh the page, the connect will lost.
We found this issue when upgrading from 1.x to 2.x
@futantan I see! Wagmi has a feature called "shim disconnects" that will remember which connector has been disconnected, and avoid reconnecting that connector on the next mount. There is an outstanding issue that seems to exist inside of Wagmi that we are currently investigating with the Wagmi team. We hope this will be resolved soon. https://github.com/wevm/wagmi/issues/3606
thank you @DanielSinclair how about we reopen this issue to track how it goes?
Is there an existing issue for this?
RainbowKit Version
2.1.1
wagmi Version
2.9.8
Current Behavior
When disconnect, the website will connect to previous wallet
Expected Behavior
Disconnect from all wallets
Steps To Reproduce
https://github.com/rainbow-me/rainbowkit/assets/6268441/0497a6dd-fc2c-45c7-84f7-97ebf4cea158
It will disconnect the OKX wallet, and connect to MetaMask wallet immediately
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
No response