Skip to content

Commit

Permalink
Hide pending transactions for accounts with missing historical txs
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Nov 5, 2024
1 parent 29b64c4 commit e7e8720
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/state/account/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e7e8720

Please sign in to comment.