diff options
author | Ian Coleman <ian@iancoleman.io> | 2020-02-07 21:25:57 +1100 |
---|---|---|
committer | Ian Coleman <ian@iancoleman.io> | 2020-02-07 21:25:57 +1100 |
commit | dd496c82c10ddd9612c80c70b4a21e05f2720624 (patch) | |
tree | a25a6232105e2cc9eecfdc32ea4ca29cf1cc9e49 /src | |
parent | 1dafc30db4e65d9ef17db6ba884dc1603585599e (diff) | |
download | BIP39-dd496c82c10ddd9612c80c70b4a21e05f2720624.tar.gz BIP39-dd496c82c10ddd9612c80c70b4a21e05f2720624.tar.zst BIP39-dd496c82c10ddd9612c80c70b4a21e05f2720624.zip |
Fix ethereum private key format
Diffstat (limited to 'src')
-rw-r--r-- | src/js/index.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/index.js b/src/js/index.js index 102c7c5..3981e81 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -1134,8 +1134,10 @@ | |||
1134 | var hexAddress = addressBuffer.toString('hex'); | 1134 | var hexAddress = addressBuffer.toString('hex'); |
1135 | var checksumAddress = libs.ethUtil.toChecksumAddress(hexAddress); | 1135 | var checksumAddress = libs.ethUtil.toChecksumAddress(hexAddress); |
1136 | address = libs.ethUtil.addHexPrefix(checksumAddress); | 1136 | address = libs.ethUtil.addHexPrefix(checksumAddress); |
1137 | privkey = libs.ethUtil.addHexPrefix(privkey); | ||
1138 | pubkey = libs.ethUtil.addHexPrefix(pubkey); | 1137 | pubkey = libs.ethUtil.addHexPrefix(pubkey); |
1138 | if (hasPrivkey) { | ||
1139 | privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer()); | ||
1140 | } | ||
1139 | } | 1141 | } |
1140 | 1142 | ||
1141 | // Stellar is different | 1143 | // Stellar is different |