gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 01/02: fix: order will stay in queryRefund state for


From: gnunet
Subject: [taler-wallet-core] 01/02: fix: order will stay in queryRefund state forever
Date: Thu, 19 Jan 2023 20:14:54 +0100

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

commit 4f376297dc3f0fc4c967de588367d62478fc85fe
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Jan 19 14:25:02 2023 -0300

    fix: order will stay in queryRefund state forever
---
 packages/taler-wallet-core/src/operations/pay-merchant.ts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts 
b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index 54ebdb5a4..14d80d17a 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -2685,6 +2685,15 @@ export async function processPurchaseQueryRefund(
         waitForAutoRefund,
       );
       if (Amounts.isZero(awaitingAmount)) {
+        // Maybe the user wanted to check for refund to find out
+        // that there is no refund pending from merchant
+        await ws.db
+          .mktx((x) => [x.purchases])
+          .runReadWrite(async (tx) => {
+            purchase.purchaseStatus = PurchaseStatus.Paid;
+            await tx.purchases.put(purchase);
+          });
+
         return OperationAttemptResult.finishedEmpty();
       }
     }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]