taler-typescript-core

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

commit 4cf569b1a2524df92abda79d195c48dd76c252f9
parent 9d4391204590bb1e3e523e5f684b99c4347a1759
Author: Florian Dold <dold@taler.net>
Date:   Fri, 11 Sep 2026 09:50:51 +0200

wallet-core: record the reason for an aborted peer payment

When reconciliation aborts payment because its purse is already gone,
record the same purse-gone reason as the direct abort path. This keeps
the reason available when the wallet reports the final transaction.

Diffstat:
Mpackages/taler-wallet-core/src/pay-peer-pull-debit.ts | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/packages/taler-wallet-core/src/pay-peer-pull-debit.ts b/packages/taler-wallet-core/src/pay-peer-pull-debit.ts @@ -537,7 +537,13 @@ export class PeerPullDebitTransactionContext implements TransactionContext { if (finalStatus === PeerPullDebitRecordStatus.Failed) { rec.failReason = reason; } else if (finalStatus === PeerPullDebitRecordStatus.Aborted) { - rec.abortReason = reason; + rec.abortReason = + reason ?? + makeErrorDetail( + TalerErrorCode.WALLET_PEER_PULL_DEBIT_PURSE_GONE, + { purseExpired: false }, + "this invoice was already paid or withdrawn by the payee", + ); } await h.update(rec, "begin-purse-reconciliation"); });