commit 545ccef072d8e7439bfed0e740972fa4801ac451
parent 7bff7676cf9d010def936c4f8071d8ced0184463
Author: Florian Dold <florian@dold.me>
Date: Fri, 20 Mar 2026 15:04:24 +0100
wallet-core: add missing expired state for peer-pull-debit transactions
Diffstat:
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
@@ -2454,6 +2454,7 @@ export enum PeerPullDebitRecordStatus {
DialogProposed = 0x0101_0001,
Done = 0x0500_0000,
+ Expired = 0x0502_0000,
Aborted = 0x0503_0000,
Failed = 0x0501_0000,
}
diff --git a/packages/taler-wallet-core/src/pay-peer-pull-debit.ts b/packages/taler-wallet-core/src/pay-peer-pull-debit.ts
@@ -241,6 +241,7 @@ export class PeerPullDebitTransactionContext implements TransactionContext {
case PeerPullDebitRecordStatus.SuspendedDeposit:
case PeerPullDebitRecordStatus.Aborted:
case PeerPullDebitRecordStatus.Failed:
+ case PeerPullDebitRecordStatus.Expired:
case PeerPullDebitRecordStatus.SuspendedAbortingRefresh:
return;
case PeerPullDebitRecordStatus.PendingDeposit:
@@ -473,7 +474,7 @@ async function processPeerPullDebitDialogProposed(
}
switch (rec.status) {
case PeerPullDebitRecordStatus.DialogProposed:
- rec.status = PeerPullDebitRecordStatus.Aborted;
+ rec.status = PeerPullDebitRecordStatus.Expired;
break;
default:
return;
@@ -721,6 +722,7 @@ export async function processPeerPullDebit(
case PeerPullDebitRecordStatus.Done:
case PeerPullDebitRecordStatus.Aborted:
case PeerPullDebitRecordStatus.Failed:
+ case PeerPullDebitRecordStatus.Expired:
case PeerPullDebitRecordStatus.SuspendedAbortingRefresh:
case PeerPullDebitRecordStatus.SuspendedDeposit:
return TaskRunResult.finished();
@@ -1086,6 +1088,10 @@ export function computePeerPullDebitTransactionState(
return {
major: TransactionMajorState.Failed,
};
+ case PeerPullDebitRecordStatus.Expired:
+ return {
+ major: TransactionMajorState.Expired,
+ };
case PeerPullDebitRecordStatus.SuspendedAbortingRefresh:
return {
major: TransactionMajorState.SuspendedAborting,
@@ -1110,6 +1116,8 @@ export function computePeerPullDebitTransactionActions(
return [TransactionAction.Delete];
case PeerPullDebitRecordStatus.AbortingRefresh:
return [TransactionAction.Fail, TransactionAction.Suspend];
+ case PeerPullDebitRecordStatus.Expired:
+ return [TransactionAction.Delete];
case PeerPullDebitRecordStatus.Failed:
return [TransactionAction.Delete];
case PeerPullDebitRecordStatus.SuspendedAbortingRefresh: