How to listen to network changed event from chain modal? #1930
Unanswered
hungdoansy
asked this question in
Q&A
Replies: 2 comments 5 replies
-
Hi @magiziz, can you give some thoughts? Thanks |
Beta Was this translation helpful? Give feedback.
5 replies
-
If you are still looking to do this or if anyone else I patched wagmi (not reccomended). It looks like wagmi handles the chain state here I have created a feature request to wagmi wevm/wagmi#4439 |
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
-
Hi guys,
I need your help with this question.
I need a way to differentiate chain is switched by webapp and by wallet connector. Here's my story.
syncConnectedChain = false
so that when users change network in their wallet, the webapp is not affected and still shows correct data from the last network.Updated:
Chain can be changed by 2 ways
User changes it in their wallet
User changes it using chain modal of RK
In case 1, I don't want our app to react to it. If the webapp's in Ethereum, it will still be Ethereum no matter what they try to change in the their wallet
In case 2, it is their intention to change the network so I'd like the webapp to save this latest chain.
In summary, I only want the webapp to change chainId (in the config) only if this is done within our webapp.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions