From e7e87202165509631bea1624d455c8afddcbb9db Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Tue, 5 Nov 2024 16:24:10 +0100 Subject: [PATCH] Hide pending transactions for accounts with missing historical txs --- src/app/state/account/selectors.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/state/account/selectors.ts b/src/app/state/account/selectors.ts index f4f429c5d0..b7ecf706c8 100644 --- a/src/app/state/account/selectors.ts +++ b/src/app/state/account/selectors.ts @@ -26,6 +26,11 @@ export const selectPendingTransactionForAccount = createSelector( export const hasAccountUnknownPendingTransactions = createSelector( [selectAccountNonce, selectTransactions, selectAccountAddress], (accountNonce, transactions, accountAddress) => { + if (!transactions.length && process.env.REACT_APP_BACKEND === 'oasisscanV2') { + // Don't bother when tx list is empty due to missing historical data in Oasis Scan v2 API + // account can have nonce and 0 transactions + return false + } const noncesFromTxs = transactions .filter(tx => !tx.runtimeId) .filter(tx => tx.from !== undefined)