gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (e263fe350 -> b5c29a8ba)


From: gnunet
Subject: [taler-wallet-core] branch master updated (e263fe350 -> b5c29a8ba)
Date: Thu, 19 Jan 2023 20:14:53 +0100

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

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

    from e263fe350 fix: do not count coins with other currency
     new 4f376297d fix: order will stay in queryRefund state forever
     new b5c29a8ba add test for commit 
4f376297dc3f0fc4c967de588367d62478fc85fe: show be able to call check refund and 
finish

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/integrationtests/test-refund.ts             | 21 ++++++++++++++++-----
 .../src/operations/pay-merchant.ts                  |  9 +++++++++
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-refund.ts 
b/packages/taler-harness/src/integrationtests/test-refund.ts
index b63dad590..91dee4905 100644
--- a/packages/taler-harness/src/integrationtests/test-refund.ts
+++ b/packages/taler-harness/src/integrationtests/test-refund.ts
@@ -84,12 +84,14 @@ export async function runRefundTest(t: GlobalTestState) {
 
   console.log(ref);
 
-  let r = await wallet.client.call(WalletApiOperation.ApplyRefund, {
-    talerRefundUri: ref.talerRefundUri,
-  });
-  console.log(r);
+  {
+    const r = await wallet.client.call(WalletApiOperation.ApplyRefund, {
+      talerRefundUri: ref.talerRefundUri,
+    });
+    console.log(r);
 
-  await wallet.runUntilDone();
+    await wallet.runUntilDone();
+  }
 
   {
     const r2 = await wallet.client.call(WalletApiOperation.GetBalances, {});
@@ -100,6 +102,15 @@ export async function runRefundTest(t: GlobalTestState) {
     console.log(JSON.stringify(r2, undefined, 2));
   }
 
+  {
+    const r3 = await 
wallet.client.call(WalletApiOperation.ApplyRefundFromPurchaseId, {
+      purchaseId: r1.proposalId
+    });
+    console.log(r3);
+
+    await wallet.runUntilDone();
+  }
+
   await t.shutdown();
 }
 
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]