useSimulateContract - Slow and unexpected return #3474
Unanswered
LeoClairet05
asked this question in
Q&A
Replies: 2 comments 1 reply
-
BUMP. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I am trying to catch error in simulation, I am using "error" return for that.
In the below code: "depositAmountValue" is a state modifiable from an input. For my test I intentionally try to deposit more than my balance.
Expected return of error would be something like: "ERC20 amount exceed balance"
I get null first, then after useSimulateContract finish loading (isLoading == false) I get the expected error and then automatically without any changes the error switch back to null.
Link to Minimal Reproducible Example
No response
Steps To Reproduce
No response
Wagmi Version
2.2.1
Viem Version
2.1.1
TypeScript Version
No response
Check existing issues
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions