@ -35,6 +35,8 @@ import {
getEIP1559V2Enabled ,
getEIP1559V2Enabled ,
getIsBuyableChain ,
getIsBuyableChain ,
getEnsResolutionByAddress ,
getEnsResolutionByAddress ,
getUnapprovedTransaction ,
getFullTxData ,
///: BEGIN:ONLY_INCLUDE_IN(flask)
///: BEGIN:ONLY_INCLUDE_IN(flask)
getInsightSnaps ,
getInsightSnaps ,
///: END:ONLY_INCLUDE_IN
///: END:ONLY_INCLUDE_IN
@ -98,10 +100,8 @@ const mapStateToProps = (state, ownProps) => {
} = metamask ;
} = metamask ;
const { tokenData , txData , tokenProps , nonce } = confirmTransaction ;
const { tokenData , txData , tokenProps , nonce } = confirmTransaction ;
const { txParams = { } , id : transactionId , type } = txData ;
const { txParams = { } , id : transactionId , type } = txData ;
const transaction =
const txId = transactionId || Number ( paramsTransactionId ) ;
Object . values ( unapprovedTxs ) . find (
const transaction = getUnapprovedTransaction ( state , txId ) ;
( { id } ) => id === ( transactionId || Number ( paramsTransactionId ) ) ,
) || { } ;
const {
const {
from : fromAddress ,
from : fromAddress ,
to : txParamsToAddress ,
to : txParamsToAddress ,
@ -148,10 +148,6 @@ const mapStateToProps = (state, ownProps) => {
gasEstimationObject ,
gasEstimationObject ,
} = transactionFeeSelector ( state , transaction ) ;
} = transactionFeeSelector ( state , transaction ) ;
if ( transaction && transaction . simulationFails ) {
txData . simulationFails = transaction . simulationFails ;
}
const currentNetworkUnapprovedTxs = Object . keys ( unapprovedTxs )
const currentNetworkUnapprovedTxs = Object . keys ( unapprovedTxs )
. filter ( ( key ) =>
. filter ( ( key ) =>
transactionMatchesNetwork ( unapprovedTxs [ key ] , chainId , network ) ,
transactionMatchesNetwork ( unapprovedTxs [ key ] , chainId , network ) ,
@ -168,16 +164,7 @@ const mapStateToProps = (state, ownProps) => {
const methodData = getKnownMethodData ( state , data ) || { } ;
const methodData = getKnownMethodData ( state , data ) || { } ;
let fullTxData = { ... txData , ... transaction } ;
const fullTxData = getFullTxData ( state , txId , customTxParamsData ) ;
if ( customTxParamsData ) {
fullTxData = {
... fullTxData ,
txParams : {
... fullTxData . txParams ,
data : customTxParamsData ,
} ,
} ;
}
const isCollectibleTransfer = Boolean (
const isCollectibleTransfer = Boolean (
allCollectibleContracts ? . [ selectedAddress ] ? . [ chainId ] ? . find ( ( contract ) => {
allCollectibleContracts ? . [ selectedAddress ] ? . [ chainId ] ? . find ( ( contract ) => {