taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit ac85036569014196dccf3d4e40b506289ec761b7
parent ea9a92a7954f2fbfcdd38234609369d36d01f9d7
Author: Florian Dold <dold@taler.net>
Date:   Wed, 22 Jul 2026 00:34:07 +0200

wallet: start after the offset when listing transactions backwards

The descending branch began at the offset transaction itself, so it was
returned again as the first entry of the next page.  The ascending branch
already excludes it.

Diffstat:
Mpackages/taler-wallet-core/src/transactions.ts | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/packages/taler-wallet-core/src/transactions.ts b/packages/taler-wallet-core/src/transactions.ts @@ -385,10 +385,12 @@ export async function getTransactionsV2( let start: number; if (offsetMtx != null) { const needleTxId = offsetMtx.transactionId; - start = res.findIndex((x) => x.transactionId === needleTxId); - if (start < 0) { + const offsetIdx = res.findIndex((x) => x.transactionId === needleTxId); + if (offsetIdx < 0) { throw Error("offset transaction not found"); } + // The offset transaction was part of the previous page. + start = offsetIdx + 1; } else { start = 0; }