Skip to content

Commit

Permalink
adds comment
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabib committed Nov 28, 2024
1 parent 4e83871 commit 2782444
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/lib/services/export-data.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ export const getAllTransactionsFromAccountAndIdentity = async ({
});

const updatedTransactions = [...allTransactions, ...transactions];

// We consider it complete if we find the oldestTxId in the list of transactions or if oldestTxId is null.
// The latter condition is necessary if the list of transactions is empty, which would otherwise return false.
const completed =
isNullish(oldestTxId) || transactions.some(({ id }) => id === oldestTxId);

if (!completed) {
const lastTx = transactions[transactions.length - 1];
return getAllTransactionsFromAccountAndIdentity({
Expand Down

0 comments on commit 2782444

Please sign in to comment.