Issue with useAccount not updating after connecting Web3Modal with Wagmi #2681
Unanswered
victorpavlenko
asked this question in
Q&A
Replies: 1 comment
-
Please, share with us a minimal reproducible example so we can help you with you problem. |
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
-
I upgraded from v2 to v5 and encountered an issue when using
@web3modal/wagmi/react
.After invoking the modal for wallet connection,
useAccount
does not update, even after the wallet is successfully connected from modal and confirmed. The state only updates after refreshing the page and waiting for some time.I tried several approaches to resolve the issue:
Used
defaultWagmiConfig
from the@web3modal/wagmi/react/config
package.Tried using
createConfig
from the latest version of[email protected]
, and manually invokingconnect
with the walletConnect connector.Also data on localhost updates, but wagmi does not respond to the state changes.
Maybe related from console
Element w3m-connecting-wc-qrcode scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.
Beta Was this translation helpful? Give feedback.
All reactions