gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: wallet-core: fix mixed age re


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: fix mixed age restrictions
Date: Fri, 16 Sep 2022 17:51:13 +0200

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 4b72bbd01 wallet-core: fix mixed age restrictions
4b72bbd01 is described below

commit 4b72bbd0170a37ce271b6bd2016401baab4adcf5
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Sep 16 17:51:07 2022 +0200

    wallet-core: fix mixed age restrictions
---
 packages/taler-wallet-core/src/crypto/cryptoImplementation.ts | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts 
b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
index 8b2bcab32..c21ee99e8 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -675,13 +675,8 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
 
       let maybeAcp: AgeCommitmentProof | undefined = undefined;
       let maybeAgeCommitmentHash: string | undefined = undefined;
-      if (req.restrictAge || denomPub.age_mask) {
-        if (req.restrictAge && denomPub.age_mask === 0) {
-          throw Error(
-            "requested age restriction for a denomination that does not 
support age restriction",
-          );
-        }
-        const age = req.restrictAge || 32;
+      if (denomPub.age_mask) {
+        const age = req.restrictAge || AgeRestriction.AGE_UNRESTRICTED;
         logger.info(`creating age-restricted planchet (age ${age})`);
         maybeAcp = await AgeRestriction.restrictionCommit(
           denomPub.age_mask,

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