mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Prevent redux state mutation (#7598)
The `txParams` property of a transaction in Redux state was being mutated. The mutation is now prevented with a shallow clone.
This commit is contained in:
parent
f61b068bd2
commit
3722de8b29
@ -322,7 +322,9 @@ function reduceMetamask (state, action) {
|
||||
let { selectedAddressTxList } = metamaskState
|
||||
selectedAddressTxList = selectedAddressTxList.map(tx => {
|
||||
if (tx.id === txId) {
|
||||
tx.txParams = value
|
||||
const newTx = Object.assign({}, tx)
|
||||
newTx.txParams = value
|
||||
return newTx
|
||||
}
|
||||
return tx
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user