gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: redo commit #aa39162de


From: gnunet
Subject: [taler-wallet-core] branch master updated: redo commit #aa39162de
Date: Thu, 23 May 2024 15:39:24 +0200

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 527716758 redo commit #aa39162de
527716758 is described below

commit 527716758f154eb863acb0052f004dd23313f765
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu May 23 10:26:54 2024 -0300

    redo commit #aa39162de
---
 packages/taler-wallet-core/src/wallet.ts | 33 +++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/packages/taler-wallet-core/src/wallet.ts 
b/packages/taler-wallet-core/src/wallet.ts
index 49ffbcfb6..c17a2b467 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -107,6 +107,7 @@ import {
   codecForGetExchangeTosRequest,
   codecForGetWithdrawalDetailsForAmountRequest,
   codecForGetWithdrawalDetailsForUri,
+  codecForHintNetworkAvailabilityRequest,
   codecForImportDbRequest,
   codecForInitRequest,
   codecForInitiatePeerPullPaymentRequest,
@@ -287,6 +288,7 @@ import {
   getWithdrawalTransactionByUri,
   parseTransactionIdentifier,
   resumeTransaction,
+  retryAll,
   retryTransaction,
   suspendTransaction,
 } from "./transactions.js";
@@ -741,7 +743,6 @@ async function dispatchRequestInternal(
           innerError: getErrorDetailFromException(e),
         });
       }
-
       wex.ws.initWithConfig(applyRunConfigDefaults(req.config));
 
       if (wex.ws.config.testing.skipDefaults) {
@@ -754,8 +755,11 @@ async function dispatchRequestInternal(
         versionInfo: getVersion(wex),
       };
 
-      // After initialization, task loop should run.
-      await wex.taskScheduler.ensureRunning();
+      if (req.config?.lazyTaskLoop) {
+        logger.trace("lazily starting task loop");
+      } else {
+        await wex.taskScheduler.ensureRunning();
+      }
 
       wex.ws.initCalled = true;
       return resp;
@@ -1043,6 +1047,10 @@ async function dispatchRequestInternal(
       const req = codecForPrepareWithdrawExchangeRequest().decode(payload);
       return handlePrepareWithdrawExchange(wex, req);
     }
+    case WalletApiOperation.CheckPayForTemplate: {
+      const req = codecForCheckPayTemplateRequest().decode(payload);
+      return await checkPayForTemplate(wex, req);
+    }
     case WalletApiOperation.PreparePayForUri: {
       const req = codecForPreparePayRequest().decode(payload);
       return await preparePayForUri(wex, req.talerPayUri);
@@ -1231,10 +1239,16 @@ async function dispatchRequestInternal(
       await loadBackupRecovery(wex, req);
       return {};
     }
-    // case WalletApiOperation.GetPlanForOperation: {
-    //   const req = codecForGetPlanForOperationRequest().decode(payload);
-    //   return await getPlanForOperation(ws, req);
-    // }
+    case WalletApiOperation.HintNetworkAvailability: {
+      const req = codecForHintNetworkAvailabilityRequest().decode(payload);
+      if (req.isNetworkAvailable) {
+        await retryAll(wex);
+      } else {
+        // We're not doing anything right now, but we could stop showing
+        // certain errors!
+      }
+      return {};
+    }
     case WalletApiOperation.ConvertDepositAmount: {
       const req = codecForConvertAmountRequest.decode(payload);
       return await convertDepositAmount(wex, req);
@@ -1829,6 +1843,11 @@ class WalletDbTriggerSpec implements TriggerSpec {
     if (info.mode !== "readwrite") {
       return;
     }
+    logger.trace(
+      `in after commit callback for readwrite, modified ${j2s([
+        ...info.modifiedStores,
+      ])}`,
+    );
     const modified = info.accessedStores;
     if (
       modified.has(WalletStoresV1.exchanges.storeName) ||

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