Skip to content

Commit

Permalink
fix: last item removal in backward pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Nov 8, 2024
1 parent 1d3dd60 commit 445fc59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/api/src/services/ledger/paginated-ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const paginatedLedger = async ({

if (transactionRecords.length > last) {
hasPreviousPage = true
transactionRecords = transactionRecords.slice(1) // Remove the extra record
transactionRecords = transactionRecords.slice(0, last) // Remove the extra record
}

// Reverse the results to maintain consistent ordering (newest first)
Expand Down

0 comments on commit 445fc59

Please sign in to comment.