gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: wallet-core: fix query for no


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: fix query for nonfinal payment transactions
Date: Mon, 08 Jan 2024 15:03:17 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 35cbcce79 wallet-core: fix query for nonfinal payment transactions
35cbcce79 is described below

commit 35cbcce79e22d7c3cd9ac1c676ad9b3480bd3fe1
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Jan 8 15:03:15 2024 +0100

    wallet-core: fix query for nonfinal payment transactions
---
 .../taler-harness/src/integrationtests/test-payment-abort.ts   |  4 +---
 packages/taler-wallet-core/src/db.ts                           | 10 ++++++++++
 packages/taler-wallet-core/src/operations/pending.ts           |  6 ++++--
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-payment-abort.ts 
b/packages/taler-harness/src/integrationtests/test-payment-abort.ts
index fe7ecbcd7..17e2705a4 100644
--- a/packages/taler-harness/src/integrationtests/test-payment-abort.ts
+++ b/packages/taler-harness/src/integrationtests/test-payment-abort.ts
@@ -98,8 +98,6 @@ export async function runPaymentAbortTest(t: GlobalTestState) 
{
 
   t.assertTrue(preparePayResp.status === PreparePayResultType.PaymentPossible);
 
-  const proposalId = preparePayResp.proposalId;
-
   publicOrderStatusResp = await harnessHttpLib.fetch(publicOrderStatusUrl);
 
   if (publicOrderStatusResp.status != 402) {
@@ -132,7 +130,7 @@ export async function runPaymentAbortTest(t: 
GlobalTestState) {
   const confirmPayResp = await walletClient.call(
     WalletApiOperation.ConfirmPay,
     {
-      proposalId,
+      transactionId: preparePayResp.transactionId,
     },
   );
 
diff --git a/packages/taler-wallet-core/src/db.ts 
b/packages/taler-wallet-core/src/db.ts
index 6f6aad256..d13e30cc6 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -254,6 +254,16 @@ export function timestampOptionalAbsoluteFromDb(
  * nnnn=0000 should always be the most generic minor state for the major state
  */
 
+/**
+ * First possible operation status in the active range (inclusive).
+ */
+export const OPERATION_STATUS_ACTIVE_FIRST = 0x0100_0000;
+
+/**
+ * LAST possible operation status in the active range (inclusive).
+ */
+export const OPERATION_STATUS_ACTIVE_LAST = 0x0113_FFFF;
+
 /**
  * Status of a withdrawal.
  */
diff --git a/packages/taler-wallet-core/src/operations/pending.ts 
b/packages/taler-wallet-core/src/operations/pending.ts
index 76b9fd801..560031ad1 100644
--- a/packages/taler-wallet-core/src/operations/pending.ts
+++ b/packages/taler-wallet-core/src/operations/pending.ts
@@ -34,6 +34,8 @@ import {
   DepositElementStatus,
   DepositGroupRecord,
   ExchangeEntryDbUpdateStatus,
+  OPERATION_STATUS_ACTIVE_FIRST,
+  OPERATION_STATUS_ACTIVE_LAST,
   PeerPullCreditRecord,
   PeerPullDebitRecordStatus,
   PeerPullPaymentCreditStatus,
@@ -418,8 +420,8 @@ export async function iterRecordsForPurchase(
 ): Promise<void> {
   if (filter.onlyState === "nonfinal") {
     const keyRange = GlobalIDB.KeyRange.bound(
-      PurchaseStatus.PendingDownloadingProposal,
-      PurchaseStatus.PendingAcceptRefund,
+      OPERATION_STATUS_ACTIVE_FIRST,
+      OPERATION_STATUS_ACTIVE_LAST,
     );
     await tx.purchases.indexes.byStatus.iter(keyRange).forEachAsync(f);
   } else {

-- 
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]