There is a <= 0 check in this code block. We should remove < check.
// Check if key count is out of bounds
if (
mandatoryKeys.length + optionalKeys.length > MAX_NUMBER_OF_SIGNATURES ||
mandatoryKeys.length + optionalKeys.length <= 0
) {
return {
status: VerifyStatus.FAIL,
error: new Error('The count of Mandatory and Optional keys should be between 1 and 64.'),
};
}
Motivation
Since mandatoryKeys & optionalKeys are both arrays, their length can never be less than 0.
Description
There is a
<= 0
check in this code block. We should remove<
check.Motivation
Since
mandatoryKeys
&optionalKeys
are both arrays, their length can never be less than 0.Additional Information
framework/src/modules/auth/commands/register_multisignature.ts