Preferred way to get chain ID from connected chain not listed in config #4189
Unanswered
0xdeployer
asked this question in
Q&A
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Need wagmi version, According to wagmi version, method get chainId is different. |
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
-
The docs state the following for
useChainId
This is a bit strange to me since the user can be connected to a completely different chain than the one intended and their wallet will still try to execute the transaction.
To get the actual chain the client is connected to I'm getting
connector
fromuseAccount
and callinggetChainId
. Is there another method for getting the actual chain ID the client is connected to?Beta Was this translation helpful? Give feedback.
All reactions