1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

ConfirmDecryptMessage: avoid mutation of state in decryptMsg/completedTx action (#17895)

* fix ConfirmEncryptionPublicKey txData

* encrypt/decrypt: fix missing txData state

* rm console.log

* ConfirmDecryptMessage: cloneDeep to avoid mutation
This commit is contained in:
Ariella Vu 2023-02-25 02:02:02 +07:00 committed by GitHub
parent bdf3b8486b
commit 60f257fd62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { compose } from 'redux'; import { compose } from 'redux';
import { withRouter } from 'react-router-dom'; import { withRouter } from 'react-router-dom';
import { cloneDeep } from 'lodash';
import { import {
goHome, goHome,
@ -25,7 +26,7 @@ function mapStateToProps(state) {
const unconfirmedTransactions = unconfirmedTransactionsListSelector(state); const unconfirmedTransactions = unconfirmedTransactionsListSelector(state);
const txData = unconfirmedTransactions[0]; const txData = cloneDeep(unconfirmedTransactions[0]);
const fromAccount = getTargetAccountWithSendEtherInfo( const fromAccount = getTargetAccountWithSendEtherInfo(
state, state,