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:
parent
fb838da734
commit
a4c6a5e92e
@ -494,13 +494,11 @@ ConfirmSendEther.prototype.gatherTxMeta = function () {
|
|||||||
const state = this.state
|
const state = this.state
|
||||||
const txData = clone(state.txData) || clone(props.txData)
|
const txData = clone(state.txData) || clone(props.txData)
|
||||||
|
|
||||||
if (txData.lastGasPrice) {
|
const { gasPrice: sendGasPrice, gas: sendGasLimit } = props.send
|
||||||
const { gasPrice: sendGasPrice, gas: sendGasLimit } = props.send
|
const { gasPrice: txGasPrice, gas: txGasLimit } = txData.txParams
|
||||||
const { gasPrice: txGasPrice, gas: txGasLimit } = txData.txParams
|
|
||||||
|
|
||||||
txData.txParams.gasPrice = sendGasPrice || txGasPrice
|
txData.txParams.gasPrice = sendGasPrice || txGasPrice
|
||||||
txData.txParams.gas = sendGasLimit || txGasLimit
|
txData.txParams.gas = sendGasLimit || txGasLimit
|
||||||
}
|
|
||||||
|
|
||||||
// log.debug(`UI has defaulted to tx meta ${JSON.stringify(txData)}`)
|
// log.debug(`UI has defaulted to tx meta ${JSON.stringify(txData)}`)
|
||||||
return txData
|
return txData
|
||||||
|
@ -487,13 +487,11 @@ ConfirmSendToken.prototype.gatherTxMeta = function () {
|
|||||||
const state = this.state
|
const state = this.state
|
||||||
const txData = clone(state.txData) || clone(props.txData)
|
const txData = clone(state.txData) || clone(props.txData)
|
||||||
|
|
||||||
if (txData.lastGasPrice) {
|
const { gasPrice: sendGasPrice, gas: sendGasLimit } = props.send
|
||||||
const { gasPrice: sendGasPrice, gas: sendGasLimit } = props.send
|
const { gasPrice: txGasPrice, gas: txGasLimit } = txData.txParams
|
||||||
const { gasPrice: txGasPrice, gas: txGasLimit } = txData.txParams
|
|
||||||
|
|
||||||
txData.txParams.gasPrice = sendGasPrice || txGasPrice
|
txData.txParams.gasPrice = sendGasPrice || txGasPrice
|
||||||
txData.txParams.gas = sendGasLimit || txGasLimit
|
txData.txParams.gas = sendGasLimit || txGasLimit
|
||||||
}
|
|
||||||
|
|
||||||
// log.debug(`UI has defaulted to tx meta ${JSON.stringify(txData)}`)
|
// log.debug(`UI has defaulted to tx meta ${JSON.stringify(txData)}`)
|
||||||
return txData
|
return txData
|
||||||
|
Loading…
Reference in New Issue
Block a user