From ec43b6a5bf4f8064aaad7fc303a10c7f585a110e Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 1 Sep 2022 22:26:22 +0200 Subject: wallet-core: fix issue with crock encoding of age restrictions --- packages/taler-wallet-core/src/util/coinSelection.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'packages/taler-wallet-core/src/util') diff --git a/packages/taler-wallet-core/src/util/coinSelection.ts b/packages/taler-wallet-core/src/util/coinSelection.ts index b3439067e..97e25abd3 100644 --- a/packages/taler-wallet-core/src/util/coinSelection.ts +++ b/packages/taler-wallet-core/src/util/coinSelection.ts @@ -291,11 +291,14 @@ export function selectPayCoins( aci.denomPub.age_mask, req.requiredMinimumAge, ); - if (!aci.ageCommitmentProof) { - // No age restriction, can't use for this payment - continue; - } - if (aci.ageCommitmentProof.proof.privateKeys.length < index) { + // if (!aci.ageCommitmentProof) { + // // No age restriction, can't use for this payment + // continue; + // } + if ( + aci.ageCommitmentProof && + aci.ageCommitmentProof.proof.privateKeys.length < index + ) { // Available age proofs to low, can't use for this payment continue; } -- cgit v1.2.3