diff options
author | Dan <danjm.com@gmail.com> | 2018-03-15 03:40:59 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-03-15 03:40:59 +0800 |
commit | a4c6a5e92e09b70db2e9ab92a8123176de127910 (patch) | |
tree | 914d04e05b134fea8cc63b9f8e6f878f5951e17b /ui/app | |
parent | fb838da7340d460650750cb8ea5fa3fb6fe319de (diff) | |
download | dexon-wallet-a4c6a5e92e09b70db2e9ab92a8123176de127910.tar.gz dexon-wallet-a4c6a5e92e09b70db2e9ab92a8123176de127910.tar.zst dexon-wallet-a4c6a5e92e09b70db2e9ab92a8123176de127910.zip |
Ensure changes from customize gas modal opened from confirm screen are captured for non-tx transactions.
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/pending-tx/confirm-send-ether.js | 10 | ||||
-rw-r--r-- | ui/app/components/pending-tx/confirm-send-token.js | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-ether.js b/ui/app/components/pending-tx/confirm-send-ether.js index 9b9a4e4e..928149cc 100644 --- a/ui/app/components/pending-tx/confirm-send-ether.js +++ b/ui/app/components/pending-tx/confirm-send-ether.js @@ -494,13 +494,11 @@ ConfirmSendEther.prototype.gatherTxMeta = function () { const state = this.state const txData = clone(state.txData) || clone(props.txData) - if (txData.lastGasPrice) { - const { gasPrice: sendGasPrice, gas: sendGasLimit } = props.send - const { gasPrice: txGasPrice, gas: txGasLimit } = txData.txParams + const { gasPrice: sendGasPrice, gas: sendGasLimit } = props.send + const { gasPrice: txGasPrice, gas: txGasLimit } = txData.txParams - txData.txParams.gasPrice = sendGasPrice || txGasPrice - txData.txParams.gas = sendGasLimit || txGasLimit - } + txData.txParams.gasPrice = sendGasPrice || txGasPrice + txData.txParams.gas = sendGasLimit || txGasLimit // log.debug(`UI has defaulted to tx meta ${JSON.stringify(txData)}`) return txData diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js index ac773b1d..fe323ffd 100644 --- a/ui/app/components/pending-tx/confirm-send-token.js +++ b/ui/app/components/pending-tx/confirm-send-token.js @@ -487,13 +487,11 @@ ConfirmSendToken.prototype.gatherTxMeta = function () { const state = this.state const txData = clone(state.txData) || clone(props.txData) - if (txData.lastGasPrice) { - const { gasPrice: sendGasPrice, gas: sendGasLimit } = props.send - const { gasPrice: txGasPrice, gas: txGasLimit } = txData.txParams + const { gasPrice: sendGasPrice, gas: sendGasLimit } = props.send + const { gasPrice: txGasPrice, gas: txGasLimit } = txData.txParams - txData.txParams.gasPrice = sendGasPrice || txGasPrice - txData.txParams.gas = sendGasLimit || txGasLimit - } + txData.txParams.gasPrice = sendGasPrice || txGasPrice + txData.txParams.gas = sendGasLimit || txGasLimit // log.debug(`UI has defaulted to tx meta ${JSON.stringify(txData)}`) return txData |