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
I checked there isn't already an issue for the bug I encountered.
Describe the bug
When the chain sync is lost between the dApp and the MetaMask wallet application (e.g., due to a slow connection, connection reset, or MetaMask app restart), the dApp fails to recover and cannot enforce the correct chain in transactions.
Link to Minimal Reproducible Example
No response
Steps To Reproduce
Wrong chain reproduction
Connect MetaMask wallet using multiple chains in configs
Change the network from the wallet and close the wallet app
Now in the dApp the chain is the initial one and you can not sync and get the updated network chain ID
WalletConnect connector does enforce chain ID, it seems that the issue is with MetaMask SDK which does not support chain ID in eth_sendTransaction. I’m opening this issue here since the connector is implemented in this repository.
The text was updated successfully, but these errors were encountered:
We are aware of this issue when using Android. Because all communication to send the new chainId is encrypted, closing the Wallet faster than the wallet is able to send this update will result in a missing event. In theory, this can happen in any time if the network conditions aren't at its best.
We're already planing to work towards changing this but for the time being we don't have an established ETA for it just yet.
It seems to be working under normal conditions but a network throttle can certainly cause these issues.
Thank you for your quick response and explanation. In our case, the issue arises when users unknowingly initiate transfers from the wrong chain, putting them in a potentially risky situation.
In our dApp, we have fixed the issue by implementing the WalletConnect connector.
Check existing issues
Describe the bug
When the chain sync is lost between the dApp and the MetaMask wallet application (e.g., due to a slow connection, connection reset, or MetaMask app restart), the dApp fails to recover and cannot enforce the correct chain in transactions.
Link to Minimal Reproducible Example
No response
Steps To Reproduce
Wrong chain reproduction
What Wagmi package(s) are you using?
@wagmi/connectors
Wagmi Package(s) Version(s)
[email protected]
Viem Version
[email protected]
TypeScript Version
No response
Anything else?
WalletConnect connector does enforce chain ID, it seems that the issue is with MetaMask SDK which does not support chain ID in
eth_sendTransaction
. I’m opening this issue here since the connector is implemented in this repository.The text was updated successfully, but these errors were encountered: