diff options
author | Florian Dold <florian@dold.me> | 2022-09-01 22:26:22 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-01 22:26:22 +0200 |
commit | ec43b6a5bf4f8064aaad7fc303a10c7f585a110e (patch) | |
tree | 1dbeabf78bc911a651c42a202b0c39e1c6906ccf /packages/taler-wallet-core/src/util | |
parent | d6a172c4a00b615dce31630bf65e6d62b30f608e (diff) | |
download | wallet-core-ec43b6a5bf4f8064aaad7fc303a10c7f585a110e.tar.xz |
wallet-core: fix issue with crock encoding of age restrictions
Diffstat (limited to 'packages/taler-wallet-core/src/util')
-rw-r--r-- | packages/taler-wallet-core/src/util/coinSelection.ts | 13 |
1 files changed, 8 insertions, 5 deletions
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; } |