From a362ff2f626b8dbf0302c1d55a55ccd3ee2da221 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Fri, 12 Feb 2021 23:33:19 +0000 Subject: Pad eth private keys correctly Fixes #469 --- src/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/js') diff --git a/src/js/index.js b/src/js/index.js index 96fc451..c502208 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1238,7 +1238,7 @@ address = libs.ethUtil.addHexPrefix(checksumAddress); pubkey = libs.ethUtil.addHexPrefix(pubkey); if (hasPrivkey) { - privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer()); + privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer(32)); } } //TRX is different -- cgit v1.2.3