mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-06 02:43:49 +00:00
Add TRX coin support
This commit is contained in:
@@ -1139,6 +1139,16 @@
|
||||
privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer());
|
||||
}
|
||||
}
|
||||
//TRX is different
|
||||
if (networks[DOM.network.val()].name == "TRX - Tron") {
|
||||
var pubkeyBuffer = keyPair.getPublicKeyBuffer();
|
||||
var ethPubkey = libs.ethUtil.importPublic(pubkeyBuffer);
|
||||
var addressBuffer = libs.ethUtil.publicToAddress(ethPubkey);
|
||||
address = libs.bitcoin.address.toBase58Check(addressBuffer, 0x41);
|
||||
if (hasPrivkey) {
|
||||
privkey = keyPair.d.toBuffer().toString('hex');
|
||||
}
|
||||
}
|
||||
|
||||
// RSK values are different
|
||||
if (networkIsRsk()) {
|
||||
@@ -3228,6 +3238,12 @@
|
||||
setHdCoin(159);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "TRX - Tron",
|
||||
onSelect: function() {
|
||||
setHdCoin(195);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "TWINS - TWINS",
|
||||
onSelect: function() {
|
||||
|
||||
Reference in New Issue
Block a user