taler-typescript-core

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

commit 52d4e0491925afe1aca5b24981b55f526db52e1c
parent de9dea067d3aada18df8af5009c665905f931310
Author: Florian Dold <florian@dold.me>
Date:   Wed, 10 Jan 2024 22:48:05 +0100

wallet-core: do not process payments in dialog states

Diffstat:
Mpackages/taler-wallet-core/src/operations/pending.ts | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/pending.ts b/packages/taler-wallet-core/src/operations/pending.ts @@ -440,6 +440,12 @@ async function gatherPurchasePending( resp: PendingOperationsResponse, ): Promise<void> { await iterRecordsForPurchase(tx, { onlyState: "nonfinal" }, async (pr) => { + switch (pr.purchaseStatus) { + // These states are nonfinal but don't need any processing + case PurchaseStatus.DialogProposed: + case PurchaseStatus.DialogShared: + return; + } const opId = TaskIdentifiers.forPay(pr); const retryRecord = await tx.operationRetries.get(opId); const timestampDue =