diff --git a/packages/wallet/backend/src/transaction/service.ts b/packages/wallet/backend/src/transaction/service.ts index 41d705848..9ad92125b 100644 --- a/packages/wallet/backend/src/transaction/service.ts +++ b/packages/wallet/backend/src/transaction/service.ts @@ -141,18 +141,20 @@ export class TransactionService implements ITransactionService { page ) - if (transactionsResponse.data.length === 0) { - return - } - const newTransactions = transactionsResponse.data.filter( (transaction) => !latestTransaction || latestTransaction.createdAt.toISOString() <= transaction.createdAt ) + + if (newTransactions.length === 0) { + return + } + if (transactionsResponse.data.length > newTransactions.length) { shouldFetchNext = false } + page++ const transactionsToSave: Partial[] = newTransactions.map(