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,13 +566,14 @@ SendTransactionScreen.prototype.getEditedTx = function () {
|
|||||||
unapprovedTxs,
|
unapprovedTxs,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
const editingTx = unapprovedTxs[editingTransactionId]
|
const editingTx = {
|
||||||
|
...unapprovedTxs[editingTransactionId],
|
||||||
editingTx.txParams = {
|
txParams: {
|
||||||
from: ethUtil.addHexPrefix(from),
|
from: ethUtil.addHexPrefix(from),
|
||||||
gas: ethUtil.addHexPrefix(gas),
|
gas: ethUtil.addHexPrefix(gas),
|
||||||
gasPrice: ethUtil.addHexPrefix(gasPrice),
|
gasPrice: ethUtil.addHexPrefix(gasPrice),
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (selectedToken) {
|
if (selectedToken) {
|
||||||
const data = TOKEN_TRANSFER_FUNCTION_SIGNATURE + Array.prototype.map.call(
|
const data = TOKEN_TRANSFER_FUNCTION_SIGNATURE + Array.prototype.map.call(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user