-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
estimateTransactionGasLimit
hides errors from the caller
#1080
Comments
We realized that the useContractFunction |
@shioju , I'm experiencing a similar issue - however the They cannot confirm the TX as the gas estimate is See the error below:
I need some way to access the error so that I can parse it using the interface, but it never reaches the dapp state. |
Describe the bug
estimateTransactionGasLimit
hides errors from the callerTo Reproduce
We're using
useContractFunction
to call a smart contract function. In this instance, we're expecting the function to revert with a custom error, and want to catch it and display an appropriate error message to the user.However, we only see the
cannot estimate gas
error in the browser console, but unable to catch the error where we're callingsend
.Relevant part of
useContractFunction
'ssend
which checks gas estimate:Relevant part of
estimateTransactionGasLimit
which catches the error but does not throw it to the caller:The text was updated successfully, but these errors were encountered: