diff --git a/src/app/state/account/selectors.ts b/src/app/state/account/selectors.ts index f4f429c5d0..d4bd684a64 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 && accountNonce && process.env.REACT_APP_BACKEND === 'oasisscanV2') { + // Don't bother when tx list is empty in this case. Oasis Scan v2 API is missing historical data. + // Account have nonce and 0 transactions due to last correctly indexed block 16817956 (2023-11-29) + return false + } const noncesFromTxs = transactions .filter(tx => !tx.runtimeId) .filter(tx => tx.from !== undefined) @@ -36,6 +41,8 @@ export const hasAccountUnknownPendingTransactions = createSelector( if (noncesFromTxs.length <= 0) { // TODO: last transaction that affected nonce is not in the initial page of account's transactions if (transactions.length >= TRANSACTIONS_LIMIT) return false + // if we cannot find any noncesFromTxs this probably means that account is missing some part of historical data + if (!noncesFromTxs.length && process.env.REACT_APP_BACKEND === 'oasisscanV2') return false // Waiting for first transactions return BigInt(accountNonce) > 0n }