[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: fix withdrawal o
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: fix withdrawal of age-restricted denoms without age restriction |
Date: |
Thu, 01 Sep 2022 22:44:00 +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 9fe0e742 wallet-core: fix withdrawal of age-restricted denoms without
age restriction
9fe0e742 is described below
commit 9fe0e742563a008623c10593973dfdfea5c0db90
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Sep 1 22:43:57 2022 +0200
wallet-core: fix withdrawal of age-restricted denoms without age restriction
---
packages/taler-wallet-core/src/crypto/cryptoImplementation.ts | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
index f0a5cba2..193712e5 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -674,16 +674,17 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
let maybeAcp: AgeCommitmentProof | undefined = undefined;
let maybeAgeCommitmentHash: string | undefined = undefined;
- if (req.restrictAge) {
- if (denomPub.age_mask === 0) {
+ 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",
);
}
- logger.info("creating age-restricted planchet");
+ const age = req.restrictAge || 32;
+ logger.info(`creating age-restricted planchet (age ${age})`);
maybeAcp = await AgeRestriction.restrictionCommit(
denomPub.age_mask,
- req.restrictAge,
+ age,
);
maybeAgeCommitmentHash = AgeRestriction.hashCommitment(
maybeAcp.commitment,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: wallet-core: fix withdrawal of age-restricted denoms without age restriction,
gnunet <=