check age mask before
This commit is contained in:
parent
16a5bb4083
commit
415874fdfb
@ -904,8 +904,7 @@ export async function updateWithdrawalDenoms(
|
|||||||
denom.verificationStatus === DenominationVerificationStatus.Unverified
|
denom.verificationStatus === DenominationVerificationStatus.Unverified
|
||||||
) {
|
) {
|
||||||
logger.trace(
|
logger.trace(
|
||||||
`Validating denomination (${current + 1}/${
|
`Validating denomination (${current + 1}/${denominations.length
|
||||||
denominations.length
|
|
||||||
}) signature of ${denom.denomPubHash}`,
|
}) signature of ${denom.denomPubHash}`,
|
||||||
);
|
);
|
||||||
let valid = false;
|
let valid = false;
|
||||||
@ -1270,6 +1269,8 @@ export async function getExchangeWithdrawalInfo(
|
|||||||
return ws.getDenomInfo(ws, tx, exchangeBaseUrl, ds.denomPubHash);
|
return ws.getDenomInfo(ws, tx, exchangeBaseUrl, ds.denomPubHash);
|
||||||
});
|
});
|
||||||
checkDbInvariant(!!denom);
|
checkDbInvariant(!!denom);
|
||||||
|
hasDenomWithAgeRestriction =
|
||||||
|
hasDenomWithAgeRestriction || denom.denomPub.age_mask > 0;
|
||||||
const expireDeposit = denom.stampExpireDeposit;
|
const expireDeposit = denom.stampExpireDeposit;
|
||||||
if (!earliestDepositExpiration) {
|
if (!earliestDepositExpiration) {
|
||||||
earliestDepositExpiration = expireDeposit;
|
earliestDepositExpiration = expireDeposit;
|
||||||
@ -1283,8 +1284,6 @@ export async function getExchangeWithdrawalInfo(
|
|||||||
) {
|
) {
|
||||||
earliestDepositExpiration = expireDeposit;
|
earliestDepositExpiration = expireDeposit;
|
||||||
}
|
}
|
||||||
hasDenomWithAgeRestriction =
|
|
||||||
hasDenomWithAgeRestriction || denom.denomPub.age_mask > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkLogicInvariant(!!earliestDepositExpiration);
|
checkLogicInvariant(!!earliestDepositExpiration);
|
||||||
|
Loading…
Reference in New Issue
Block a user