diff options
author | zr <zr@coinhub.dev> | 2020-09-18 15:28:56 +0800 |
---|---|---|
committer | zr <zr@coinhub.dev> | 2020-09-18 15:28:56 +0800 |
commit | d7125cda1d60199016272c34b2ce740f06077293 (patch) | |
tree | 5699996d543f6a020da84db81051da658e695a6f | |
parent | b674c5710b70c9dac9f11758cac222d45575dec2 (diff) | |
download | BIP39-d7125cda1d60199016272c34b2ce740f06077293.tar.gz BIP39-d7125cda1d60199016272c34b2ce740f06077293.tar.zst BIP39-d7125cda1d60199016272c34b2ce740f06077293.zip |
Modify to use uncompressed public key as keccak256 input for TRX
-rw-r--r-- | src/js/index.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/js/index.js b/src/js/index.js index 2c02721..e959c58 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -1141,6 +1141,7 @@ | |||
1141 | } | 1141 | } |
1142 | //TRX is different | 1142 | //TRX is different |
1143 | if (networks[DOM.network.val()].name == "TRX - Tron") { | 1143 | if (networks[DOM.network.val()].name == "TRX - Tron") { |
1144 | keyPair = new libs.bitcoin.ECPair(keyPair.d, null, { network: network, compressed: false }); | ||
1144 | var pubkeyBuffer = keyPair.getPublicKeyBuffer(); | 1145 | var pubkeyBuffer = keyPair.getPublicKeyBuffer(); |
1145 | var ethPubkey = libs.ethUtil.importPublic(pubkeyBuffer); | 1146 | var ethPubkey = libs.ethUtil.importPublic(pubkeyBuffer); |
1146 | var addressBuffer = libs.ethUtil.publicToAddress(ethPubkey); | 1147 | var addressBuffer = libs.ethUtil.publicToAddress(ethPubkey); |