gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: fixing wrong break statements


From: gnunet
Subject: [taler-wallet-core] branch master updated: fixing wrong break statements
Date: Mon, 08 Jan 2024 21:59:39 +0100

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 f366084d0 fixing wrong break statements
f366084d0 is described below

commit f366084d070a3f59bbdfe1fe1d31a0f3719d5c1c
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Jan 8 17:58:14 2024 -0300

    fixing wrong break statements
---
 packages/taler-wallet-core/src/util/coinSelection.ts | 20 ++++++++++----------
 .../taler-wallet-webextension/src/platform/chrome.ts |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/packages/taler-wallet-core/src/util/coinSelection.ts 
b/packages/taler-wallet-core/src/util/coinSelection.ts
index f24184609..6070f4c78 100644
--- a/packages/taler-wallet-core/src/util/coinSelection.ts
+++ b/packages/taler-wallet-core/src/util/coinSelection.ts
@@ -233,9 +233,9 @@ function tallyFees(
 
 export type SelectPayCoinsResult =
   | {
-      type: "failure";
-      insufficientBalanceDetails: PayMerchantInsufficientBalanceDetails;
-    }
+    type: "failure";
+    insufficientBalanceDetails: PayMerchantInsufficientBalanceDetails;
+  }
   | { type: "success"; coinSel: PayCoinSelection };
 
 /**
@@ -614,7 +614,7 @@ async function selectPayMerchantCandidates(
       const denoms: AvailableDenom[] = [];
       const exchanges = await tx.exchanges.iter().toArray();
       const wfPerExchange: Record<string, AmountJson> = {};
-      for (const exchange of exchanges) {
+      loopExchange: for (const exchange of exchanges) {
         const exchangeDetails = await getExchangeWireDetailsInTx(
           tx,
           exchange.baseUrl,
@@ -625,7 +625,7 @@ async function selectPayMerchantCandidates(
         }
         let wireMethodFee: string | undefined;
         // 2.- exchange supports wire method
-        for (const acc of exchangeDetails.wireInfo.accounts) {
+        loopWireAccount: for (const acc of exchangeDetails.wireInfo.accounts) {
           const pp = parsePaytoUri(acc.payto_uri);
           checkLogicInvariant(!!pp);
           if (pp.targetType !== req.wireMethod) {
@@ -656,11 +656,11 @@ async function selectPayMerchantCandidates(
 
           if (wireFeeStr) {
             wireMethodFee = wireFeeStr;
+            break loopWireAccount;
           }
-          break;
         }
         if (!wireMethodFee) {
-          break;
+          continue;
         }
         wfPerExchange[exchange.baseUrl] = Amounts.parseOrThrow(wireMethodFee);
 
@@ -889,9 +889,9 @@ export interface PeerCoinSelectionDetails {
 export type SelectPeerCoinsResult =
   | { type: "success"; result: PeerCoinSelectionDetails }
   | {
-      type: "failure";
-      insufficientBalanceDetails: PayPeerInsufficientBalanceDetails;
-    };
+    type: "failure";
+    insufficientBalanceDetails: PayPeerInsufficientBalanceDetails;
+  };
 
 export interface PeerCoinRepair {
   exchangeBaseUrl: string;
diff --git a/packages/taler-wallet-webextension/src/platform/chrome.ts 
b/packages/taler-wallet-webextension/src/platform/chrome.ts
index 20cf54035..68fa63474 100644
--- a/packages/taler-wallet-webextension/src/platform/chrome.ts
+++ b/packages/taler-wallet-webextension/src/platform/chrome.ts
@@ -742,7 +742,7 @@ function containsTalerHeaderListener(): boolean {
 function headerListener(
   details: chrome.webRequest.WebResponseHeadersDetails,
 ): chrome.webRequest.BlockingResponse | undefined {
-  logger.info("header listener run", details.statusCode, 
chrome.runtime.lastError)
+  logger.trace("header listener run", details.statusCode, 
chrome.runtime.lastError)
   if (chrome.runtime.lastError) {
     logger.error(JSON.stringify(chrome.runtime.lastError));
     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]