gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] 01/03: check age mask before


From: gnunet
Subject: [taler-wallet-core] 01/03: check age mask before
Date: Wed, 21 Sep 2022 01:27:00 +0200

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

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

commit 415874fdfb60b58243bd972a51cfa580afe3b749
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Sep 20 20:14:46 2022 -0300

    check age mask before
---
 packages/taler-wallet-core/src/operations/withdraw.ts | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts 
b/packages/taler-wallet-core/src/operations/withdraw.ts
index 7dd874f49..897d56bbe 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -262,7 +262,7 @@ export function selectWithdrawalDenominations(
       DenominationRecord.getValue(d),
       d.fees.feeWithdraw,
     ).amount;
-    for (;;) {
+    for (; ;) {
       if (Amounts.cmp(remaining, cost) < 0) {
         break;
       }
@@ -904,8 +904,7 @@ export async function updateWithdrawalDenoms(
         denom.verificationStatus === DenominationVerificationStatus.Unverified
       ) {
         logger.trace(
-          `Validating denomination (${current + 1}/${
-            denominations.length
+          `Validating denomination (${current + 1}/${denominations.length
           }) signature of ${denom.denomPubHash}`,
         );
         let valid = false;
@@ -988,7 +987,7 @@ async function queryReserve(
     if (
       resp.status === 404 &&
       result.talerErrorResponse.code ===
-        TalerErrorCode.EXCHANGE_RESERVES_STATUS_UNKNOWN
+      TalerErrorCode.EXCHANGE_RESERVES_STATUS_UNKNOWN
     ) {
       ws.notify({
         type: NotificationType.ReserveNotYetFound,
@@ -1270,6 +1269,8 @@ export async function getExchangeWithdrawalInfo(
         return ws.getDenomInfo(ws, tx, exchangeBaseUrl, ds.denomPubHash);
       });
     checkDbInvariant(!!denom);
+    hasDenomWithAgeRestriction =
+      hasDenomWithAgeRestriction || denom.denomPub.age_mask > 0;
     const expireDeposit = denom.stampExpireDeposit;
     if (!earliestDepositExpiration) {
       earliestDepositExpiration = expireDeposit;
@@ -1283,8 +1284,6 @@ export async function getExchangeWithdrawalInfo(
     ) {
       earliestDepositExpiration = expireDeposit;
     }
-    hasDenomWithAgeRestriction =
-      hasDenomWithAgeRestriction || denom.denomPub.age_mask > 0;
   }
 
   checkLogicInvariant(!!earliestDepositExpiration);
@@ -1312,7 +1311,7 @@ export async function getExchangeWithdrawalInfo(
     ) {
       logger.warn(
         `wallet's support for exchange protocol version 
${WALLET_EXCHANGE_PROTOCOL_VERSION} might be outdated ` +
-          `(exchange has ${exchangeDetails.protocolVersion}), checking for 
updates`,
+        `(exchange has ${exchangeDetails.protocolVersion}), checking for 
updates`,
       );
     }
   }

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