Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chainChanged event not detected with WalletConnect #275

Closed
RiccardoBiosas opened this issue May 19, 2021 · 8 comments
Closed

chainChanged event not detected with WalletConnect #275

RiccardoBiosas opened this issue May 19, 2021 · 8 comments

Comments

@RiccardoBiosas
Copy link
Contributor

When using metamask through the web3Modal walletconnect provider, if I change the network on metamask after successfully connecting to the dapp the client does not appear to detect the chainChanged event.

// Subscribe to chainId change
provider.on("chainChanged", (chainId: number) => {
  console.log(chainId);
});
@acrens
Copy link

acrens commented Aug 25, 2021

How to solve this problem?

@HasnainAsif
Copy link

I have tried networkChanged event too, but it only works when I change my wallet address and always gives undefined value.
If anyone know any solution can you please help.

@Deokti
Copy link

Deokti commented Dec 28, 2021

connector.on("session_update", () => {}); doesn't work also

@Deokti
Copy link

Deokti commented Dec 28, 2021

Looks like it's a MetaMask's problem.
MetaMask/metamask-mobile#2927

In Test WalletConnect Wallet it works
https://test.walletconnect.org/

@moahammadalt
Copy link

Same issue over here.

@mburger81
Copy link

Do you use ethers or web3js?

The web3js seems to have the events, but not ethers

@HasnainAsif
Copy link

We are using web3js

@chadyj chadyj added the v1 label Sep 19, 2022
@xzilja
Copy link
Contributor

xzilja commented Jan 21, 2023

With stable version 2.0.0 of Web3Modal now released, we are officially dropping support for version 1.x
Due to this this issue/pr was marked for closing. It is highly recommended to upgrade as 2.x will be receiving further updates that will enable functionality for some of our newer sdks like auth and push as well as support for WalletConnect v2 (See this post about WalletConnect v1 being deprecated https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e)

If you need to continue using Web3Modal 1.x and require this feature/fix implemented, we suggest adding it via forking V1 branch.

@xzilja xzilja closed this as completed Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants