aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/send-v2.js
diff options
context:
space:
mode:
authorThomas <tmashuang@gmail.com>2018-03-21 02:35:59 +0800
committerThomas <tmashuang@gmail.com>2018-03-21 02:35:59 +0800
commitd4eb883958e7c13029726484e61d1db01b77d0ff (patch)
treeabe3938f6426040bcb01464bceb74316fd7107e1 /ui/app/send-v2.js
parent2c42cfdf1e8c8aff517cae9f6011dd39e503cef3 (diff)
parent716e034c75c53bbcc0d81a36c2eadf140c53ca9c (diff)
downloadtangerine-wallet-browser-d4eb883958e7c13029726484e61d1db01b77d0ff.tar.gz
tangerine-wallet-browser-d4eb883958e7c13029726484e61d1db01b77d0ff.tar.zst
tangerine-wallet-browser-d4eb883958e7c13029726484e61d1db01b77d0ff.zip
Merge branch 'master' into i3571-CompleteI18nTemplates
Diffstat (limited to 'ui/app/send-v2.js')
-rw-r--r--ui/app/send-v2.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js
index dbfa6025d..31118378d 100644
--- a/ui/app/send-v2.js
+++ b/ui/app/send-v2.js
@@ -43,6 +43,7 @@ function SendTransactionScreen () {
to: null,
amount: null,
},
+ gasLoadingError: false,
}
this.handleToChange = this.handleToChange.bind(this)
@@ -129,6 +130,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,
}),
]),
@@ -571,9 +578,11 @@ SendTransactionScreen.prototype.getEditedTx = function () {
data,
})
} else {
+ const data = unapprovedTxs[editingTransactionId].txParams.data
Object.assign(editingTx.txParams, {
value: ethUtil.addHexPrefix(amount),
to: ethUtil.addHexPrefix(to),
+ data,
})
}