Skip to content

Commit

Permalink
fix: dont display other wallet accounts in tx history degraded popover (
Browse files Browse the repository at this point in the history
  • Loading branch information
woodenfurniture authored Jun 20, 2024
1 parent 481de89 commit cb2e719
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/state/slices/txHistorySlice/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
} from 'state/selectors'

import { selectAssets } from '../assetsSlice/selectors'
import { selectWalletAccountIds } from '../common-selectors'
import { selectWalletAccountIds, selectWalletEnabledAccountIds } from '../common-selectors'
import { selectPortfolioAccountMetadata } from '../portfolioSlice/selectors'
import type { Tx, TxId, TxIdsByAccountIdAssetId } from './txHistorySlice'

Expand Down Expand Up @@ -314,9 +314,11 @@ export const selectIsTxHistoryAvailableByFilter = createCachedSelector(

export const selectErroredTxHistoryAccounts = createDeepEqualOutputSelector(
(state: ReduxState) => state.txHistory.hydrationMeta,
hydrationMeta => {
selectWalletEnabledAccountIds,
(hydrationMeta, walletEnabledAccountIds) => {
return Object.entries(hydrationMeta)
.filter(([_accountId, hydrationMetaForAccountId]) => hydrationMetaForAccountId?.isErrored)
.map(([accountId, _hydrationMetaForAccountId]) => accountId)
.filter(accountId => walletEnabledAccountIds.includes(accountId))
},
)

0 comments on commit cb2e719

Please sign in to comment.