You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Wagmi on top of viem. I use useWriteContractHook. I want to be able to detect that user rejected write contract manually in the wallet. Only this i can do know it seems to wrap writeContractAsync with try catch and then check the error message as there is even no dedicated class for this case
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I use Wagmi on top of viem. I use
useWriteContractHook
. I want to be able to detect that user rejected write contract manually in the wallet. Only this i can do know it seems to wrapwriteContractAsync
with try catch and then check the error message as there is even no dedicated class for this caseonly
TransactionExecutionError
which can stand for other cses not only user manual rejection. That really could be improved.Beta Was this translation helpful? Give feedback.
All reactions