aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx-details.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-03-01 08:36:05 +0800
committerKevin Serrano <kevgagser@gmail.com>2017-03-01 08:36:05 +0800
commita600ccd4f863d7a473392fc283f4cec248225a27 (patch)
treec91dae0c308fb41a461fe85ce4cbeca5b49211df /ui/app/components/pending-tx-details.js
parentaf66e2b9acc4fc6d807d9625d1022214196d233d (diff)
downloadtangerine-wallet-browser-a600ccd4f863d7a473392fc283f4cec248225a27.tar
tangerine-wallet-browser-a600ccd4f863d7a473392fc283f4cec248225a27.tar.gz
tangerine-wallet-browser-a600ccd4f863d7a473392fc283f4cec248225a27.tar.bz2
tangerine-wallet-browser-a600ccd4f863d7a473392fc283f4cec248225a27.tar.lz
tangerine-wallet-browser-a600ccd4f863d7a473392fc283f4cec248225a27.tar.xz
tangerine-wallet-browser-a600ccd4f863d7a473392fc283f4cec248225a27.tar.zst
tangerine-wallet-browser-a600ccd4f863d7a473392fc283f4cec248225a27.zip
Add reset button to reset gas fields.
Diffstat (limited to 'ui/app/components/pending-tx-details.js')
-rw-r--r--ui/app/components/pending-tx-details.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js
index 61e18c706..b1ab9576b 100644
--- a/ui/app/components/pending-tx-details.js
+++ b/ui/app/components/pending-tx-details.js
@@ -12,7 +12,6 @@ const addressSummary = util.addressSummary
const nameForAddress = require('../../lib/contract-namer')
const HexInput = require('./hex-as-decimal-input')
-
module.exports = PendingTxDetails
inherits(PendingTxDetails, Component)
@@ -35,8 +34,8 @@ PTXP.render = function () {
const gas = state.gas || txParams.gas
const gasPrice = state.gasPrice || txData.gasPrice
- const gasDefault = gas
- const gasPriceDefault = gasPrice
+ const gasDefault = txParams.gas
+ const gasPriceDefault = txData.gasPrice
var txFee = state.txFee || txData.txFee || ''
var maxCost = state.maxCost || txData.maxCost || ''
@@ -301,6 +300,15 @@ PTXP.calculateGas = function () {
}
}
+PTXP.resetGasFields = function () {
+ log.debug(`pending-tx-details#resetGasFields`)
+ const txData = this.props.txData
+ this.setState({
+ gas: txData.txParams.gas,
+ gasPrice: txData.gasPrice,
+ })
+}
+
// After a customizable state value has been updated,
PTXP.gatherParams = function () {
log.debug(`pending-tx-details#gatherParams`)