Detecting the active chain via wallet v2 #3599
Closed
dylmanning
started this conversation in
General
Replies: 1 comment
-
Well I'm going to answer my own question due to my ignorance. const { chainId } = useAccount(); provides the analogue for v2 |
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
-
Hello, prior to v2 we were able to use the following hook to fetch the current selected network/chain in our provider
This would update every-time the network has been changed in the wallet provider, allowing a immediate response.
I understand there have been changes here. With the intention to synchronise with the connector chains, but this leaves me at a loss in how to replicate the pattern above with
useChainId()
or evengetChainId()
Thanks any advice would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions