Request user to switch to supported chain using Wagmi and WalletConnect in ReactJS. #2664
Unanswered
BrahimSeriah
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using useEffect to update currentPayment state : [ETH, BNB, MATIC, ...] if the user switch chain from his wallet (ex Metamask).
I have the case where I want to ask user to switch to supported chain if he selects a chain from his wallet not supported in my wagmi config.
Something similar to this:
I don't know where or how to automatically show this modal and force user to switch to supported chains.
The closest thing I got is
and this requires to add logic to check for current chainId and keep opening this modal until user selects supported chain.
Beta Was this translation helpful? Give feedback.
All reactions