1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Ensure changes from customize gas modal opened from confirm screen are captured for non-tx transactions.

This commit is contained in:
Dan 2018-03-14 17:10:59 -02:30
parent fb838da734
commit a4c6a5e92e
2 changed files with 8 additions and 12 deletions

View File

@ -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

View File

@ -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