-
Notifications
You must be signed in to change notification settings - Fork 573
Description
Bug description
A dApp that connects to Safe{Wallet} via WalletConnect cannot seem to successfully switch chains. Instead switching chains, it appears to try to re-authorize and loses context causing a disconnect on the dApp side. The Safe app still shows an active connection though. This appears to happen when connected through both the Safe web app and the iOS app. The safe web app will sometimes show an alert that says "The {dApp} wants to switch the network to Eth" or something similar, but by this time the dApp has lost the connection. I've seen this behavior with local dApps and with popular dApps like pancakeswap and uniswap. This could also potentially be a bug in the WalletConnect or wagmi code.
Environment
- Browser: Chrome
- Wallet: WalletConnect
- Chain: Ethereum mainnet
Steps to reproduce
- Go to https://pancakeswap.finance/
- Click the "Connect Wallet" button at the top of the screen
- Click the "WalletConnect" button in the modal
- Find Safe in the WalletConnect modal and connect via QR code or WebApp
- Switch the chain from the selector at the top of the screen
- Re-authorize and go back to pancakeswap, notice the wallet connection was broken
Expected result
A dApp can switch chains successfully without disconnecting.
Obtained result
A disconnection occurs.
Screenshots
