How does the web3wallet detect when the dapp changes the network #5277
Replies: 1 comment
-
For anyone else looking at this, WalletConnect actually recommends not having any chain selection in the wallet. You include your supported chains when building the namespace, and that's all. User can change the network on the app side, that doesn't impact the wallet at all. Trust Wallet is an example of this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After connecting to a dapp, I want to know when the user changes the selected network in the dapp. I've been testing with https://lab.web3modal.com/library/wagmi/, but cannot figure out how to get this information. Can't find anything in the docs.
I've added all the methods and events listed here: https://docs.walletconnect.com/walletkit/web/usage#evm-methods--events
and I'm watching on all the different listeners (i.e. session_request, session_proposal) but not seeing anything come through on the wallet side when I change the network in the dapp. Other actions work fine (sign transaction, sign message) so the connection seems to be fine.
Beta Was this translation helpful? Give feedback.
All reactions