From eb06ed89bea5e287612729aac58dc22546dc252a Mon Sep 17 00:00:00 2001 From: Djavid Gabibiyan Date: Mon, 17 Apr 2023 17:30:21 +0500 Subject: [PATCH 1/2] feat: make `PrivateKey#toBuffer` method return padded buffer --- lib/privatekey.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/privatekey.js b/lib/privatekey.js index 48f132e26..d445b530b 100644 --- a/lib/privatekey.js +++ b/lib/privatekey.js @@ -353,8 +353,7 @@ PrivateKey.prototype.toBigNumber = function () { * @returns {Buffer} A buffer of the private key */ PrivateKey.prototype.toBuffer = function () { - // TODO: use `return this.bn.toBuffer({ size: 32 })` in v1.0.0 - return this.bn.toBuffer(); + return this.bn.toBuffer({ size: 32 }); }; /** From 77ca7d5343649562ba2233405099d9c8e6a94705 Mon Sep 17 00:00:00 2001 From: Djavid Gabibiyan Date: Tue, 18 Apr 2023 15:37:14 +0500 Subject: [PATCH 2/2] chore: empty commit