diff --git a/web3.js/src/publickey.js b/web3.js/src/publickey.js index 9003b86ccf..3af8d5ec4b 100644 --- a/web3.js/src/publickey.js +++ b/web3.js/src/publickey.js @@ -50,7 +50,7 @@ export class PublicKey { * Return the base-58 representation of the public key */ toBuffer(): Buffer { - const b = this._bn.toBuffer(); + const b = this._bn.toArrayLike(Buffer); if (b.length === 32) { return b; }