diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-01 07:21:48 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-01 07:21:48 +0800 |
commit | 576cc9eb754258f3a534633af460ff657c8e112a (patch) | |
tree | 5f4120c1b7f04336131891aa3647caa42c787315 /ui | |
parent | 9fb4b4a77fb97e5bf1081127071c232d9729e8eb (diff) | |
download | tangerine-wallet-browser-576cc9eb754258f3a534633af460ff657c8e112a.tar tangerine-wallet-browser-576cc9eb754258f3a534633af460ff657c8e112a.tar.gz tangerine-wallet-browser-576cc9eb754258f3a534633af460ff657c8e112a.tar.bz2 tangerine-wallet-browser-576cc9eb754258f3a534633af460ff657c8e112a.tar.lz tangerine-wallet-browser-576cc9eb754258f3a534633af460ff657c8e112a.tar.xz tangerine-wallet-browser-576cc9eb754258f3a534633af460ff657c8e112a.tar.zst tangerine-wallet-browser-576cc9eb754258f3a534633af460ff657c8e112a.zip |
Gas and Gaslimit revert to default if set to 0
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/pending-tx-details.js | 14 |
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 f5651bb1d..5eade525a 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 }) + } }, }), ]), |