From a3c7da975b6375f8c57154875642fb29a67e8731 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 21 Feb 2023 20:31:23 +0100 Subject: wallet-core: fix peer-pull-credit long-polling and peer-pull-debit pending operation status --- packages/taler-wallet-core/src/operations/pending.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/pending.ts') diff --git a/packages/taler-wallet-core/src/operations/pending.ts b/packages/taler-wallet-core/src/operations/pending.ts index 458448b31..5e14721f8 100644 --- a/packages/taler-wallet-core/src/operations/pending.ts +++ b/packages/taler-wallet-core/src/operations/pending.ts @@ -390,8 +390,13 @@ async function gatherPeerPullDebitPending( resp: PendingOperationsResponse, ): Promise { await tx.peerPullPaymentIncoming.iter().forEachAsync(async (pi) => { - if (pi.status === PeerPullPaymentIncomingStatus.Paid) { - return; + switch (pi.status) { + case PeerPullPaymentIncomingStatus.Paid: + return; + case PeerPullPaymentIncomingStatus.Proposed: + return; + case PeerPullPaymentIncomingStatus.Accepted: + break; } const opId = TaskIdentifiers.forPeerPullPaymentDebit(pi); const retryRecord = await tx.operationRetries.get(opId); -- cgit v1.2.3