mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Clone transaction while editing instead of mutating object from state.
This commit is contained in:
parent
9ced63584b
commit
e7e1b7a951
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user