Wallet Connection Check for serial processing #2513
Unanswered
berkaycirak
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to build a dapp and using wagmi for multi chain wallet options. While user connecting a wallet, user first connects to the wallet then sign a message to be authenticated (to be connected to my dapp). However, if I use
const {isConnected} = useAccount()
, it returns true when user connects to the wallet even if he didn't sign the message. To avoid that, I create a custom hook which returnsisConnect = true
after user connecting and then signing the message.Also, same thing happens when I use
const {error} = useConnect()
. I want to check any error while user connecting and signing message on my dapp but when user connects the app then rejects the sign message, I couldn't catch that error. To catch that error I have to useconst {error} = useSignMessage()
.--> Is there any short way without using custom hook? I want to listen my whole connecting process (like connect wallet and sign message to be authenticated) and if there is an error or any status like connected, loading etc I want to show that status to user while connecting to my dapp.
Beta Was this translation helpful? Give feedback.
All reactions