aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-03-01 07:46:47 +0800
committerDan Finlay <dan@danfinlay.com>2017-03-01 07:46:47 +0800
commitaf66e2b9acc4fc6d807d9625d1022214196d233d (patch)
treecc71d60838e11aea4383d5a28f3eb9a4d3bc83a2 /ui/app/components
parent865764dff55a29443b45a4f0e720820f67be9bcd (diff)
parent9bffe2d11a9bd177201591cd45034d93568c0014 (diff)
downloadtangerine-wallet-browser-af66e2b9acc4fc6d807d9625d1022214196d233d.tar
tangerine-wallet-browser-af66e2b9acc4fc6d807d9625d1022214196d233d.tar.gz
tangerine-wallet-browser-af66e2b9acc4fc6d807d9625d1022214196d233d.tar.bz2
tangerine-wallet-browser-af66e2b9acc4fc6d807d9625d1022214196d233d.tar.lz
tangerine-wallet-browser-af66e2b9acc4fc6d807d9625d1022214196d233d.tar.xz
tangerine-wallet-browser-af66e2b9acc4fc6d807d9625d1022214196d233d.tar.zst
tangerine-wallet-browser-af66e2b9acc4fc6d807d9625d1022214196d233d.zip
Merge branch 'i765-gaslimits' of github.com:MetaMask/metamask-plugin into i765-gaslimits
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/pending-tx-details.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js
index eddf7db4c..61e18c706 100644
--- a/ui/app/components/pending-tx-details.js
+++ b/ui/app/components/pending-tx-details.js
@@ -35,6 +35,8 @@ PTXP.render = function () {
const gas = state.gas || txParams.gas
const gasPrice = state.gasPrice || txData.gasPrice
+ const gasDefault = gas
+ const gasPriceDefault = gasPrice
var txFee = state.txFee || txData.txFee || ''
var maxCost = state.maxCost || txData.maxCost || ''
@@ -130,7 +132,11 @@ PTXP.render = function () {
},
onChange: (newHex) => {
log.info(`Gas limit changed to ${newHex}`)
- this.setState({ gas: newHex })
+ if (newHex === '0x0') {
+ this.setState({gas: gasDefault})
+ } else {
+ this.setState({ gas: newHex })
+ }
},
}),
]),
@@ -150,7 +156,11 @@ PTXP.render = function () {
},
onChange: (newHex) => {
log.info(`Gas price changed to: ${newHex}`)
- this.setState({ gasPrice: newHex })
+ if (newHex === '0x0') {
+ this.setState({gasPrice: gasPriceDefault})
+ } else {
+ this.setState({ gasPrice: newHex })
+ }
},
}),
]),