diff --git a/web3.js/src/publickey.js b/web3.js/src/publickey.js index 27f50ce69b..a37b3560f1 100644 --- a/web3.js/src/publickey.js +++ b/web3.js/src/publickey.js @@ -68,7 +68,7 @@ export class PublicKey { return b; } - const zeroPad = new Buffer(32); + const zeroPad = Buffer.alloc(32); b.copy(zeroPad); return zeroPad; }