Skip to content

When using WalletConnectModal with the Sign API, how can I get the currently active chainId of the wallet? #3318

Discussion options

You must be logged in to vote

Hi, Sign API works with an agnostic chain protocol (CAIP-25) so you establish a session with multiple chains at once, you only need to specify the chain when sending a transaction for example https://docs.walletconnect.com/2.0/web/sign/dapp-usage#making-requests

If you still need to track the chains (because some wallets will behave differently) you can use event listeners like session_update https://docs.walletconnect.com/2.0/web/sign/dapp-usage#create-a-session

If you'd like a more high level library I'd recommend ethereum-provider or universal-provider

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@154286
Comment options

Answer selected by glitch-txs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants