Wallet is disconnected for a split second on page reload #2125
-
Hi I have this issue on one of my profile page. Where there is a check that if wallet isn't connected ui show a toast "wallet isnt connected" but after sometime say maybe after 1-2 seconds the wallet gets connected. Is there a way to handle this. Because previously only metamask was used but since integrating rainbow wallet i am getting this behavior. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@wahabshah21 Can you check if it's also connecting / reconnecting rather than only looking for if it's disconnected only ? Wagmi has |
Beta Was this translation helpful? Give feedback.
@wahabshah21 Can you check if it's also connecting / reconnecting rather than only looking for if it's disconnected only ? Wagmi has
useAccount
hook which could be helpful. Here is the documentation https://wagmi.sh/react/api/hooks/useAccount#status