gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (12cecf2bc -> 12d2157cd)


From: gnunet
Subject: [taler-wallet-core] branch master updated (12cecf2bc -> 12d2157cd)
Date: Wed, 06 Mar 2024 08:49:17 +0100

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

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

    from 12cecf2bc Translated using Weblate (Ukrainian)
     new a7d034920 wallet-core: enable deposit long-polling
     new 12d2157cd harness: observability

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:
 packages/taler-harness/src/harness/helpers.ts | 24 +++++++++++++++++-------
 packages/taler-wallet-core/src/deposits.ts    | 13 +++----------
 packages/taler-wallet-core/src/remote.ts      |  2 --
 3 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/packages/taler-harness/src/harness/helpers.ts 
b/packages/taler-harness/src/harness/helpers.ts
index 46dc9f9d4..ea9047d0b 100644
--- a/packages/taler-harness/src/harness/helpers.ts
+++ b/packages/taler-harness/src/harness/helpers.ts
@@ -422,22 +422,32 @@ export async function createWalletDaemonWithClient(
   await walletService.start();
   await walletService.pingUntilAvailable();
 
+  const observabilityEventFile = t.testDir + `/wallet-${args.name}-notifs.log`;
+
+  const onNotif = (notif: WalletNotification) => {
+    if (observabilityEventFile) {
+      fs.appendFileSync(
+        observabilityEventFile,
+        new Date().toISOString() + " " + JSON.stringify(notif) + "\n",
+      );
+    }
+    if (args.handleNotification) {
+      args.handleNotification(notif);
+    }
+  };
+
   const walletClient = new WalletClient({
     name: args.name,
     unixPath: walletService.socketPath,
-    onNotification(n) {
-      console.log(`got ${args.name} notification`, n);
-      if (args.handleNotification) {
-        args.handleNotification(n);
-      }
-    },
+    onNotification: onNotif,
   });
   await walletClient.connect();
   const defaultRunConfig = {
     testing: {
       skipDefaults: true,
+      emitObservabilityEvents: !!process.env["TALER_TEST_OBSERVABILITY"],
     },
-  };
+  } satisfies PartialWalletRunConfig;
   await walletClient.client.call(WalletApiOperation.InitWallet, {
     config: args.config ?? defaultRunConfig,
   });
diff --git a/packages/taler-wallet-core/src/deposits.ts 
b/packages/taler-wallet-core/src/deposits.ts
index 68ebc9507..960b123c6 100644
--- a/packages/taler-wallet-core/src/deposits.ts
+++ b/packages/taler-wallet-core/src/deposits.ts
@@ -109,11 +109,7 @@ import {
   notifyTransition,
   parseTransactionIdentifier,
 } from "./transactions.js";
-import {
-  InternalWalletState,
-  WalletExecutionContext,
-  getDenomInfo,
-} from "./wallet.js";
+import { WalletExecutionContext, getDenomInfo } from "./wallet.js";
 import { getCandidateWithdrawalDenomsTx } from "./withdraw.js";
 
 /**
@@ -891,9 +887,7 @@ async function processDepositGroupPendingTrack(
     });
     return TaskRunResult.finished();
   } else {
-    // Backing off until deposit long-polling works in the exchange.
-    return TaskRunResult.backoff();
-    // return TaskRunResult.longpollReturnedPending();
+    return TaskRunResult.longpollReturnedPending();
   }
 }
 
@@ -1128,8 +1122,7 @@ async function trackDeposit(
     wireHash,
   });
   url.searchParams.set("merchant_sig", sigResp.sig);
-  // Not doing long-polling yet as it looks like it's broken in the exchange 
(2024-02-20)
-  // url.searchParams.set("timeout_ms", "30000");
+  url.searchParams.set("timeout_ms", "30000");
   const httpResp = await wex.http.fetch(url.href, {
     method: "GET",
     cancellationToken: wex.cancellationToken,
diff --git a/packages/taler-wallet-core/src/remote.ts 
b/packages/taler-wallet-core/src/remote.ts
index b81c56e0c..d7623baab 100644
--- a/packages/taler-wallet-core/src/remote.ts
+++ b/packages/taler-wallet-core/src/remote.ts
@@ -17,7 +17,6 @@
 import {
   CoreApiRequestEnvelope,
   CoreApiResponse,
-  j2s,
   Logger,
   OpenedPromise,
   openPromise,
@@ -92,7 +91,6 @@ export async function createRemoteWallet(
         onMessage(m) {
           // FIXME: use a codec for parsing the response envelope!
 
-          logger.info(`${args.name}: got message from remote: ${j2s(m)}`);
           if (typeof m !== "object" || m == null) {
             logger.warn(`${args.name}: message not understood (wrong type)`);
             return;

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