Skip to content

Commit

Permalink
Fix ethereum private key format
Browse files Browse the repository at this point in the history
  • Loading branch information
iancoleman committed Feb 7, 2020
1 parent 1dafc30 commit dd496c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,10 @@
var hexAddress = addressBuffer.toString('hex');
var checksumAddress = libs.ethUtil.toChecksumAddress(hexAddress);
address = libs.ethUtil.addHexPrefix(checksumAddress);
privkey = libs.ethUtil.addHexPrefix(privkey);
pubkey = libs.ethUtil.addHexPrefix(pubkey);
if (hasPrivkey) {
privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer());
}
}

// Stellar is different
Expand Down

0 comments on commit dd496c8

Please sign in to comment.