chore: use constant for PUBLIC_KEY_LENGTH for checking length of input (#27876)
This commit is contained in:
parent
61803b914f
commit
0e70275b07
|
@ -69,7 +69,7 @@ export class PublicKey extends Struct {
|
|||
this._bn = new BN(value);
|
||||
}
|
||||
|
||||
if (this._bn.byteLength() > 32) {
|
||||
if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {
|
||||
throw new Error(`Invalid public key input`);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue