aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorIan Coleman <ian@iancoleman.io>2021-02-12 23:33:19 +0000
committerIan Coleman <ian@iancoleman.io>2021-02-12 23:33:19 +0000
commita362ff2f626b8dbf0302c1d55a55ccd3ee2da221 (patch)
tree9b135ae5e0e2ee1bf857ab2d91b7927d7eb6c97d /src/js
parent9a82f12b915b179c39719af2ea12dace01287575 (diff)
downloadBIP39-a362ff2f626b8dbf0302c1d55a55ccd3ee2da221.tar.gz
BIP39-a362ff2f626b8dbf0302c1d55a55ccd3ee2da221.tar.zst
BIP39-a362ff2f626b8dbf0302c1d55a55ccd3ee2da221.zip
Pad eth private keys correctly
Fixes #469
Diffstat (limited to 'src/js')
-rw-r--r--src/js/index.js2
1 files changed, 1 insertions, 1 deletions
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 @@
1238 address = libs.ethUtil.addHexPrefix(checksumAddress); 1238 address = libs.ethUtil.addHexPrefix(checksumAddress);
1239 pubkey = libs.ethUtil.addHexPrefix(pubkey); 1239 pubkey = libs.ethUtil.addHexPrefix(pubkey);
1240 if (hasPrivkey) { 1240 if (hasPrivkey) {
1241 privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer()); 1241 privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer(32));
1242 } 1242 }
1243 } 1243 }
1244 //TRX is different 1244 //TRX is different