55 selectPendingSmartTransactionsBySender ,
66 selectPendingSmartTransactionsForSelectedAccountGroup ,
77} from './smartTransactionsController' ;
8- import { selectSelectedAccountGroupInternalAccounts } from './multichainAccounts/accountTreeController' ;
8+ import { selectSelectedAccountGroupWithInternalAccountsAddresses } from './multichainAccounts/accountTreeController' ;
99import {
1010 TransactionMeta ,
1111 TransactionType ,
@@ -18,7 +18,7 @@ interface MetaMaskPayToken {
1818 chainId : Hex ;
1919}
2020
21- const PENDING_EVM_TRANSACTION_STATUSES = new Set ( [
21+ const transactionPendingStatuses = new Set ( [
2222 'submitted' ,
2323 'signed' ,
2424 'unapproved' ,
@@ -139,20 +139,13 @@ export const selectLocalTransactions = createDeepEqualSelector(
139139 [
140140 selectNonReplacedTransactions ,
141141 selectPendingSmartTransactionsForSelectedAccountGroup ,
142- selectSelectedAccountGroupInternalAccounts ,
142+ selectSelectedAccountGroupWithInternalAccountsAddresses ,
143143 ] ,
144- (
145- nonReplacedTransactions ,
146- pendingSmartTransactions ,
147- selectedAccountGroupInternalAccounts ,
148- ) => {
149- const selectedAddresses = selectedAccountGroupInternalAccounts
150- . map ( ( account ) => account . address )
151- . filter ( Boolean ) ;
152-
144+ ( nonReplacedTransactions , pendingSmartTransactions , addresses ) => {
153145 const pendingTransactions = nonReplacedTransactions . filter (
154146 ( transaction ) => {
155- if ( ! PENDING_EVM_TRANSACTION_STATUSES . has ( transaction . status ) ) {
147+ // Extracted from UnifiedTransactionsView submittedTxs filter
148+ if ( ! transactionPendingStatuses . has ( transaction . status ) ) {
156149 return false ;
157150 }
158151
@@ -161,8 +154,9 @@ export const selectLocalTransactions = createDeepEqualSelector(
161154 return false ;
162155 }
163156
164- return selectedAddresses . some ( ( address ) =>
165- areAddressesEqual ( fromAddress , address ) ,
157+ // Extracted from UnifiedTransactionsView submittedTxsFiltered filter
158+ return addresses . some ( ( address ) =>
159+ areAddressesEqual ( fromAddress , address || '' ) ,
166160 ) ;
167161 } ,
168162 ) ;
0 commit comments