aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/send-v2.js
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2018-03-20 17:17:45 +0800
committerGitHub <noreply@github.com>2018-03-20 17:17:45 +0800
commit5cdaf270f798218bddc72bde05d8ab77267cfb94 (patch)
treea857cf36325d9b537bf4bb3c6516cbd94284d912 /ui/app/send-v2.js
parent424e98f6a896df6a848a92ef318464abc505d83d (diff)
downloadtangerine-wallet-browser-5cdaf270f798218bddc72bde05d8ab77267cfb94.tar.gz
tangerine-wallet-browser-5cdaf270f798218bddc72bde05d8ab77267cfb94.tar.zst
tangerine-wallet-browser-5cdaf270f798218bddc72bde05d8ab77267cfb94.zip
Don't block user from setting gas if estimating gas returns errors. (#3627)
Diffstat (limited to 'ui/app/send-v2.js')
-rw-r--r--ui/app/send-v2.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js
index fc1df1f51..5ac59fc29 100644
--- a/ui/app/send-v2.js
+++ b/ui/app/send-v2.js
@@ -42,6 +42,7 @@ function SendTransactionScreen () {
to: null,
amount: null,
},
+ gasLoadingError: false,
}
this.handleToChange = this.handleToChange.bind(this)
@@ -128,6 +129,10 @@ SendTransactionScreen.prototype.updateGas = function () {
.then(([gasPrice, gas]) => {
const newGasTotal = this.getGasTotal(gas, gasPrice)
updateGasTotal(newGasTotal)
+ this.setState({ gasLoadingError: false })
+ })
+ .catch(err => {
+ this.setState({ gasLoadingError: true })
})
} else {
const newGasTotal = this.getGasTotal(gasLimit, gasPrice)
@@ -436,6 +441,7 @@ SendTransactionScreen.prototype.renderGasRow = function () {
showCustomizeGasModal,
gasTotal,
} = this.props
+ const { gasLoadingError } = this.state
return h('div.send-v2__form-row', [
@@ -448,6 +454,7 @@ SendTransactionScreen.prototype.renderGasRow = function () {
conversionRate,
convertedCurrency,
onClick: showCustomizeGasModal,
+ gasLoadingError,
}),
]),