aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzr <zr@coinhub.dev>2020-09-18 15:28:56 +0800
committerzr <zr@coinhub.dev>2020-09-18 15:28:56 +0800
commitd7125cda1d60199016272c34b2ce740f06077293 (patch)
tree5699996d543f6a020da84db81051da658e695a6f /src
parentb674c5710b70c9dac9f11758cac222d45575dec2 (diff)
downloadBIP39-d7125cda1d60199016272c34b2ce740f06077293.tar.gz
BIP39-d7125cda1d60199016272c34b2ce740f06077293.tar.zst
BIP39-d7125cda1d60199016272c34b2ce740f06077293.zip
Modify to use uncompressed public key as keccak256 input for TRX
Diffstat (limited to 'src')
-rw-r--r--src/js/index.js1
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);