gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: -remove deprecated type


From: gnunet
Subject: [taler-wallet-core] branch master updated: -remove deprecated type
Date: Wed, 06 Mar 2024 10:23:44 +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 794a9dc01 -remove deprecated type
794a9dc01 is described below

commit 794a9dc01185ffa5f6d3cf22d1041b4e8f468f48
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Mar 6 10:23:39 2024 +0100

    -remove deprecated type
---
 packages/taler-util/src/wallet-types.ts   | 27 +++++++++------------------
 packages/taler-wallet-core/src/refresh.ts | 16 +++++++++++-----
 2 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/packages/taler-util/src/wallet-types.ts 
b/packages/taler-util/src/wallet-types.ts
index ef1581af5..1efa6651f 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -630,11 +630,11 @@ export interface CoinDumpJson {
     withdrawal_reserve_pub: string | undefined;
     coin_status: CoinStatus;
     spend_allocation:
-    | {
-      id: string;
-      amount: AmountString;
-    }
-    | undefined;
+      | {
+          id: string;
+          amount: AmountString;
+        }
+      | undefined;
     /**
      * Information about the age restriction
      */
@@ -1100,15 +1100,6 @@ export interface CoinRefreshRequest {
   readonly amount: AmountString;
 }
 
-/**
- * Wrapper for refresh group IDs.
- *
- * @deprecated use types instead
- */
-export interface RefreshGroupId {
-  readonly refreshGroupId: string;
-}
-
 /**
  * Private data required to make a deposit permission.
  */
@@ -2586,15 +2577,15 @@ export const codecForActiveTask = (): Codec<ActiveTask> 
=>
     .property("id", codecForString())
     .property("transaction", codecOptional(codecForTransactionIdStr()))
     .property("counter", codecForNumber())
-    .property("firstTry", (codecForAbsoluteTime))
-    .property("nextTry", (codecForAbsoluteTime))
+    .property("firstTry", codecForAbsoluteTime)
+    .property("nextTry", codecForAbsoluteTime)
     .property("lastError", codecForTalerErrorDetail())
-    .build("ActiveTask")
+    .build("ActiveTask");
 
 export const codecForGetActiveTasks = (): Codec<GetActiveTasks> =>
   buildCodecForObject<GetActiveTasks>()
     .property("tasks", codecForList(codecForActiveTask()))
-    .build("GetActiveTasks")
+    .build("GetActiveTasks");
 
 export interface ImportDbRequest {
   dump: any;
diff --git a/packages/taler-wallet-core/src/refresh.ts 
b/packages/taler-wallet-core/src/refresh.ts
index f67fb5015..c6ece1536 100644
--- a/packages/taler-wallet-core/src/refresh.ts
+++ b/packages/taler-wallet-core/src/refresh.ts
@@ -44,7 +44,6 @@ import {
   Logger,
   makeErrorDetail,
   NotificationType,
-  RefreshGroupId,
   RefreshReason,
   TalerError,
   TalerErrorCode,
@@ -101,7 +100,6 @@ import {
 import {
   EXCHANGE_COINS_LOCK,
   getDenomInfo,
-  InternalWalletState,
   WalletExecutionContext,
 } from "./wallet.js";
 import { getCandidateWithdrawalDenomsTx } from "./withdraw.js";
@@ -1412,14 +1410,18 @@ export function getRefreshesForTransaction(
   });
 }
 
+export interface ForceRefreshResult {
+  refreshGroupId: string;
+}
+
 export async function forceRefresh(
   wex: WalletExecutionContext,
   req: ForceRefreshRequest,
-): Promise<{ refreshGroupId: RefreshGroupId }> {
+): Promise<ForceRefreshResult> {
   if (req.coinPubList.length == 0) {
     throw Error("refusing to create empty refresh group");
   }
-  const refreshGroupId = await wex.db.runReadWriteTx(
+  const res = await wex.db.runReadWriteTx(
     ["refreshGroups", "coinAvailability", "denominations", "coins"],
     async (tx) => {
       let coinPubs: CoinRefreshRequest[] = [];
@@ -1451,7 +1453,11 @@ export async function forceRefresh(
     },
   );
 
+  for (const notif of res.notifications) {
+    wex.ws.notify(notif);
+  }
+
   return {
-    refreshGroupId,
+    refreshGroupId: res.refreshGroupId,
   };
 }

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