Multi-chain configuraton for WalletConnect #3706
-
I have some problem with wagmi and WalletConnect
I am using Trust Wallet. I have imported in it my metamask wallet via private key as Etherium and Polygon separate wallets. So my wallets are not multi-chain wallets. When trying to connect with Poligon wallet I receive error: Is this a bug or do i have some problems in configuration? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
the way wagmi works is, first chain of the array gets added as required chain of the session, that's by it needs to be supported, we will remove this config and move everything to optional chains soon. |
Beta Was this translation helpful? Give feedback.
-
Hey @glitch-txs - Can you explain this a bit more? I'm experiencing a similar issue trying to use web3modal - throughout our dapp we connect users with Are you saying we should use the connect function from the useConnect hook of wagmi and specify only the compatible chain? |
Beta Was this translation helpful? Give feedback.
the way wagmi works is, first chain of the array gets added as required chain of the session, that's by it needs to be supported, we will remove this config and move everything to optional chains soon.
For now you can pass the chain you want to connect to into the wagmi's connect function and that chain is going to override the required one.