fix: make toBytes actually return the type it's typehint claims (#29313)
This commit is contained in:
parent
c8dd5bbd48
commit
0b479066b3
|
@ -112,7 +112,8 @@ export class PublicKey extends Struct {
|
|||
* Return the byte array representation of the public key in big endian
|
||||
*/
|
||||
toBytes(): Uint8Array {
|
||||
return this.toBuffer();
|
||||
const buf = this.toBuffer();
|
||||
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue