Using web3wallet, how to set current chain when pairing with dapp #5276
Replies: 2 comments
-
I guess that one Wallet can't change the dApp's chain directly. WalletConnect only establishes a connection across multiple addresses and chains, but it doesn't automatically update or reflect those changes within the dApp itself. |
Beta Was this translation helpful? Give feedback.
0 replies
-
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. Trust Wallet is an example of how this is done. |
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
-
In my wallet, I'm using the
buildApprovedNamespaces
util function to construct the namespaces when pairing with a dapp. I can properly set all my supported chains. But when connecting to the dapp, I want to tell the dapp what chain the user is currently set to in the wallet.Could not find anything in the docs about this. Is there a recommended way to do this? Should we emit a chain changed event after the connection is successful? Something else?
Beta Was this translation helpful? Give feedback.
All reactions