Remove `Buffer` from `validateDataIntegrity`

This commit is contained in:
Franck Royer 2022-05-19 16:47:27 +10:00
parent 64ea36faa3
commit 0964425a12
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 1 additions and 3 deletions

View File

@ -234,9 +234,7 @@ function validateDataIntegrity(
return false; return false;
} }
return !( return expectedSize <= 3 || value.findIndex((i) => i !== 0) !== -1;
expectedSize > 3 && Buffer.from(value).equals(Buffer.alloc(value.length))
);
} }
function getSignature(message: Uint8Array): Uint8Array { function getSignature(message: Uint8Array): Uint8Array {