fix: PublicKey.toBuffer() now zero pads correctly

This commit is contained in:
Michael Vines
2018-10-23 12:25:02 -07:00
parent 5a42cadefe
commit 96c685eb5d
2 changed files with 18 additions and 8 deletions

View File

@ -69,7 +69,7 @@ export class PublicKey {
}
const zeroPad = Buffer.alloc(32);
b.copy(zeroPad);
b.copy(zeroPad, 32 - b.length);
return zeroPad;
}