• Luke Schoen's avatar
    review-fix: Add try/catch and throw error if estimateGas throws. See commit details · e5761260
    Luke Schoen authored
    * 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
    e5761260