From f9cf7006dfdc123224f08c5a79706a05b1e415bf Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 2 Oct 2018 21:01:58 -0700 Subject: [PATCH] fix: avoid Buffer(), use Buffer.alloc() instead --- web3.js/src/publickey.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }