Skip to content
Commit e5761260 authored by Luke Schoen's avatar Luke Schoen
Browse files

review-fix: Add try/catch and throw error if estimateGas throws. See commit details

* Remove `isEstimatedTxFee` since can just use `estimatedTxFee` to achieve same functionality

* Rename `newEstimatedTxFee` to `newGasEstimate` since it returns a value that's used for the `values.gas` prop

* Update `estimatedTxFee` to return `null` if the amount, gas, gasPrice values provided aren't valid, instead of returning the calculated estimated tx fee

* Wrap call to `estimateGas` in a try/catch block that throws error "Unable to estimate gas" when error thrown when calling `estimateGas` in TxForm.js

* Move check `if (!ethBalance) {` earlier in function
parent 01887a38
Pipeline #27646 passed with stage
in 2 minutes and 5 seconds