1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 18:41:38 +01:00

Clone transaction while editing instead of mutating object from state.

This commit is contained in:
Dan 2017-12-20 19:11:18 -03:30 committed by Chi Kei Chan
parent 9ced63584b
commit e7e1b7a951

View File

@ -566,12 +566,13 @@ SendTransactionScreen.prototype.getEditedTx = function () {
unapprovedTxs,
} = this.props
const editingTx = unapprovedTxs[editingTransactionId]
editingTx.txParams = {
from: ethUtil.addHexPrefix(from),
gas: ethUtil.addHexPrefix(gas),
gasPrice: ethUtil.addHexPrefix(gasPrice),
const editingTx = {
...unapprovedTxs[editingTransactionId],
txParams: {
from: ethUtil.addHexPrefix(from),
gas: ethUtil.addHexPrefix(gas),
gasPrice: ethUtil.addHexPrefix(gasPrice),
}
}
if (selectedToken) {