metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

chainChanged event not getting fired for WalletConnect

Open taylorjdawson opened this issue 3 years ago • 12 comments

Describe the bug Walletconnect chainChanged event not getting triggered when a user switches their network in the MM Mobile app.

To Reproduce Steps to reproduce the behavior

  1. On desktop go to reactdemo.blocknative.com
  2. Click Select Wallet then Show More then select WalletConnect
  3. Next click Wallet Checks the WalletConnect QR code will appear
  4. Open MM Mobile and go to your wallet (if you are not there already)
  5. Click the QR code button in the top right
  6. Scan the QR code on your screen with the MM mobile app
  7. You should then see your address and balance and most importantly the network displayed in the react-demo
  8. Now in the MM Mobile app change networks
  9. The you'll notice that the network in the react demo won't update
  10. Now change your account in the MM Mobile app. You'll notice that the react demo now updates.

Before you jump to conclusions this is not an issue with the react-demo as demonstrated in this issue in wallet connect

Expected behavior The chainChained event should get fired and it does not.

Smartphone (please complete the following information):

  • Device: OnePlus 8 Pro
  • OS: Android 11
  • App Version: 2.5.0

I believe these are these lines where the issue can be found.


to be added after bug submission by internal support / PM Severity

  • How critical is the impact of this bug on a user?
  • Add stats if available on % of customers impacted
  • Is this visible to all users?
  • Is this tech debt?

taylorjdawson avatar Jul 22 '21 01:07 taylorjdawson

We're facing the same issue. accountsChanged event works fine, but chainChanged event is not getting triggered when user switches network in the MetaMask mobile app. It is quite serious, because we don't want users to sign transactions on an unintended network.

Device: iPhone 6s Plus OS: 14.4.2 App Version: 3.0.1

pROFESOR11 avatar Aug 07 '21 10:08 pROFESOR11

We're facing the same issue. accountsChanged event works fine, but chainChanged event is not getting triggered when user switches network in the MetaMask mobile app. It is quite serious, because we don't want users to sign transactions on an unintended network.

Device: iPhone 6s Plus OS: 14.4.2 App Version: 3.0.1

I am also facing the same issue with Metamask mobile app.

kayroy247 avatar Aug 18 '21 07:08 kayroy247

we're facing the same issue and would really appreciate a fix

kinggongzilla avatar Aug 19 '21 20:08 kinggongzilla

same issue over here

nicosampler avatar Aug 20 '21 11:08 nicosampler

this problem is becoming more important for dapps supporting L2

nicosampler avatar Aug 20 '21 11:08 nicosampler

same issue over here,How to solve it?

acrens avatar Aug 25 '21 08:08 acrens

The problem still exists, it makes metamask-mobile unsuitable to be used with WalletConnect. The user can switch network on its mobile without notifying the app and the app can't decide which chain must be used to perform a transaction. So unsafe that this is a killing bug.

jeremiealbert avatar Oct 14 '21 12:10 jeremiealbert

To be precise this issue makes metamak-mobile not compliant anymore with EIP-1193 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#chainchanged)

To quote the EIP-1193 : "If the chain the Provider is connected to changes, the Provider MUST emit the event named chainChanged with value chainId: string, specifying the integer ID of the new chain as a hexadecimal string, per the eth_chainId Ethereum RPC method."

Can you tell if this will be resolved soon ? It seems to me this should be considered as a top priority bug to solve. What do you think ?

jeremiealbert avatar Oct 14 '21 12:10 jeremiealbert

This problem still exists. For what is most likely the most popular portal for walletConnect, makes it hard to build around this issue.

garrettparris avatar Jan 20 '22 17:01 garrettparris

Related to #3581 & PR #3300

gantunesr avatar Jan 21 '22 15:01 gantunesr

Same issue over here

moahammadalt avatar Jan 26 '22 14:01 moahammadalt

same issue, please fix! 🙏

eshaben avatar Feb 03 '22 17:02 eshaben

This issue was closed because it has been stalled for 7 days with no activity. If you feel this was closed in error please reopen and provide evidence on the current production app. Thank you for your contributions.

github-actions[bot] avatar Jun 17 '23 01:06 github-actions[bot]