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: rename getTransa


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: rename getTransactionsV2 filter argument
Date: Fri, 04 Oct 2024 15:27:50 +0200

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 0bfb22d46 wallet-core: rename getTransactionsV2 filter argument
0bfb22d46 is described below

commit 0bfb22d46bfab359950913b59da44d9768d06298
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Oct 4 15:27:46 2024 +0200

    wallet-core: rename getTransactionsV2 filter argument
    
    Just to be more compatible with the old request
---
 packages/taler-util/src/types-taler-wallet-transactions.ts | 4 ++--
 packages/taler-wallet-core/src/transactions.ts             | 8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/packages/taler-util/src/types-taler-wallet-transactions.ts 
b/packages/taler-util/src/types-taler-wallet-transactions.ts
index 39abe1199..67f03ba17 100644
--- a/packages/taler-util/src/types-taler-wallet-transactions.ts
+++ b/packages/taler-util/src/types-taler-wallet-transactions.ts
@@ -149,7 +149,7 @@ export interface GetTransactionsV2Request {
    *
    * If not specified, all transactions are returned.
    */
-  filterState?: "final" | "nonfinal" | "done";
+  filterByState?: "final" | "nonfinal" | "done";
 }
 
 export interface TransactionState {
@@ -859,7 +859,7 @@ export const codecForGetTransactionsV2Request =
       .property("offsetTimestamp", codecOptional(codecForPreciseTimestamp))
       .property("limit", codecOptional(codecForNumber()))
       .property(
-        "filterState",
+        "filterByState",
         codecOptional(
           codecForEither(
             codecForConstString("final"),
diff --git a/packages/taler-wallet-core/src/transactions.ts 
b/packages/taler-wallet-core/src/transactions.ts
index 4d3dbb45d..bfab1be78 100644
--- a/packages/taler-wallet-core/src/transactions.ts
+++ b/packages/taler-wallet-core/src/transactions.ts
@@ -76,7 +76,10 @@ import { WithdrawTransactionContext } from "./withdraw.js";
 const logger = new Logger("taler-wallet-core:transactions.ts");
 
 function shouldSkipCurrency(
-  transactionsRequest: TransactionsRequest | undefined,
+  transactionsRequest:
+    | TransactionsRequest
+    | GetTransactionsV2Request
+    | undefined,
   currency: string,
   exchangesInTransaction: string[],
 ): boolean {
@@ -104,7 +107,6 @@ function shouldSkipCurrency(
         assertUnreachable(transactionsRequest.scopeInfo);
     }
   }
-  // FIXME: remove next release
   if (transactionsRequest?.currency) {
     return (
       transactionsRequest.currency.toLowerCase() !== currency.toLowerCase()
@@ -191,7 +193,7 @@ function checkFilterIncludes(
 
   let included: boolean;
 
-  const filter = req?.filterState;
+  const filter = req?.filterByState;
   switch (filter) {
     case "done":
       included =

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