diff --git a/.changelog/1999.internal.md b/.changelog/1999.internal.md new file mode 100644 index 0000000000..d61106ac00 --- /dev/null +++ b/.changelog/1999.internal.md @@ -0,0 +1 @@ +Filter runtime txs when fetching detailed txs diff --git a/src/app/state/account/saga.ts b/src/app/state/account/saga.ts index 811f5a9fe6..7888c62574 100644 --- a/src/app/state/account/saga.ts +++ b/src/app/state/account/saga.ts @@ -57,7 +57,17 @@ export function* fetchAccount(action: PayloadAction) { }) const detailedTransactions = yield* call(() => - Promise.allSettled(transactions.map(({ hash }) => getTransaction({ hash }))), + Promise.allSettled( + transactions.map(tx => { + const { hash, runtimeId, runtimeName, round } = tx + + if (!!runtimeId || !!runtimeName || !!round) { + return Promise.reject() + } + + return getTransaction({ hash }) + }), + ), ) const transactionsWithUpdatedNonce = transactions.map((t, i) => { const { status, value } = detailedTransactions[i] as PromiseFulfilledResult diff --git a/src/app/state/transaction/types.ts b/src/app/state/transaction/types.ts index e10bd512b6..ca9a509903 100644 --- a/src/app/state/transaction/types.ts +++ b/src/app/state/transaction/types.ts @@ -49,12 +49,12 @@ export interface Transaction { timestamp: number | undefined to: string | undefined type: TransactionType + nonce: StringifiedBigInt | undefined // These are undefined on consensus transaction // Only appear on ParaTime transaction runtimeName: string | undefined runtimeId: string | undefined round: number | undefined - nonce: StringifiedBigInt | undefined } /* --- STATE --- */