diff options
author | Florian Dold <florian@dold.me> | 2024-01-10 22:48:05 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-01-10 22:48:05 +0100 |
commit | 52d4e0491925afe1aca5b24981b55f526db52e1c (patch) | |
tree | 4386b9030e963829107a59ce335eb91f12a02356 /packages/taler-wallet-core | |
parent | de9dea067d3aada18df8af5009c665905f931310 (diff) | |
download | wallet-core-52d4e0491925afe1aca5b24981b55f526db52e1c.tar.xz |
wallet-core: do not process payments in dialog states
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pending.ts | 6 |
1 files 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 index 20359624d..990d9a7b3 100644 --- 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 = |