wallet-core: only attest age if required/possible
This commit is contained in:
parent
f9192d986f
commit
d780e9b187
@ -916,10 +916,12 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
|
|||||||
);
|
);
|
||||||
maybeAgeCommitmentHash = ach;
|
maybeAgeCommitmentHash = ach;
|
||||||
hAgeCommitment = decodeCrock(ach);
|
hAgeCommitment = decodeCrock(ach);
|
||||||
minimumAgeSig = AgeRestriction.commitmentAttest(
|
if (depositInfo.requiredMinimumAge != null) {
|
||||||
depositInfo.ageCommitmentProof,
|
minimumAgeSig = AgeRestriction.commitmentAttest(
|
||||||
depositInfo.requiredMinimumAge!,
|
depositInfo.ageCommitmentProof,
|
||||||
);
|
depositInfo.requiredMinimumAge,
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// All zeros.
|
// All zeros.
|
||||||
hAgeCommitment = new Uint8Array(32);
|
hAgeCommitment = new Uint8Array(32);
|
||||||
|
Loading…
Reference in New Issue
Block a user