You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As indicated in this thread and in MetaMask/metamask-extension#13375, despite passing { shimDisconnect: true, shimChainChangedDisconnect: true }, the wallet can still sometimes involuntarily disconnect when the user switches the chain from inside the metamask browser extension.
For context,, when testing this on a mature non-wagmi app such as Uniswap, we're able to switch (to, from) any chain in the metamask browser extension without the Uniswap UI involuntarily disconnecting.
Expected Behavior
After connecting in the app, never spontaneously disconnect, regardless of which network a user switches to in their wallet, even if that network is unsuppoted/unconfigured in the current wagmi client instance.
Steps To Reproduce
Non-deterministic reproduction (sometimes it disconnects, sometimes it doesn't):
load the link below (the only change from new.wagmi.sh is the addition of shim/shimDisconnect: true in Metamask connector
connect wallet
switch network between goerli and zkSyncTestnet in metamask browser extension. Sometimes it'll disconnect in the app.
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
This issue has been locked since it has been closed for more than 14 days.
If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion.
Is there an existing issue for this?
Package Version
0.11.3
Current Behavior
As indicated in this thread and in MetaMask/metamask-extension#13375, despite passing
{ shimDisconnect: true, shimChainChangedDisconnect: true }
, the wallet can still sometimes involuntarily disconnect when the user switches the chain from inside the metamask browser extension.For context,, when testing this on a mature non-wagmi app such as Uniswap, we're able to switch (to, from) any chain in the metamask browser extension without the Uniswap UI involuntarily disconnecting.
Expected Behavior
After connecting in the app, never spontaneously disconnect, regardless of which network a user switches to in their wallet, even if that network is unsuppoted/unconfigured in the current wagmi client instance.
Steps To Reproduce
Non-deterministic reproduction (sometimes it disconnects, sometimes it doesn't):
shim/shimDisconnect: true
in Metamask connectorLink to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
https://stackblitz.com/edit/new-wagmi-utduc3?file=src%2Fwagmi.ts
Anything else?
No response
The text was updated successfully, but these errors were encountered: