diff options
-rw-r--r-- | src/js/index.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/js/index.js b/src/js/index.js index 252eec1..2c02721 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -1139,6 +1139,16 @@ | |||
1139 | privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer()); | 1139 | privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer()); |
1140 | } | 1140 | } |
1141 | } | 1141 | } |
1142 | //TRX is different | ||
1143 | if (networks[DOM.network.val()].name == "TRX - Tron") { | ||
1144 | var pubkeyBuffer = keyPair.getPublicKeyBuffer(); | ||
1145 | var ethPubkey = libs.ethUtil.importPublic(pubkeyBuffer); | ||
1146 | var addressBuffer = libs.ethUtil.publicToAddress(ethPubkey); | ||
1147 | address = libs.bitcoin.address.toBase58Check(addressBuffer, 0x41); | ||
1148 | if (hasPrivkey) { | ||
1149 | privkey = keyPair.d.toBuffer().toString('hex'); | ||
1150 | } | ||
1151 | } | ||
1142 | 1152 | ||
1143 | // RSK values are different | 1153 | // RSK values are different |
1144 | if (networkIsRsk()) { | 1154 | if (networkIsRsk()) { |
@@ -3229,6 +3239,12 @@ | |||
3229 | }, | 3239 | }, |
3230 | }, | 3240 | }, |
3231 | { | 3241 | { |
3242 | name: "TRX - Tron", | ||
3243 | onSelect: function() { | ||
3244 | setHdCoin(195); | ||
3245 | }, | ||
3246 | }, | ||
3247 | { | ||
3232 | name: "TWINS - TWINS", | 3248 | name: "TWINS - TWINS", |
3233 | onSelect: function() { | 3249 | onSelect: function() { |
3234 | network = libs.bitcoin.networks.twins; | 3250 | network = libs.bitcoin.networks.twins; |