X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fjs%2Findex.js;h=c502208d3b468737c3cc1f86d059434e5ba9de1d;hb=a362ff2f626b8dbf0302c1d55a55ccd3ee2da221;hp=1f4cc1fe12ab203ff39474804ac1e63c44c1463b;hpb=8835afe8a2a01bb189a8712c0797ea60566f553a;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/src/js/index.js b/src/js/index.js index 1f4cc1f..c502208 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1238,7 +1238,7 @@ address = libs.ethUtil.addHexPrefix(checksumAddress); pubkey = libs.ethUtil.addHexPrefix(pubkey); if (hasPrivkey) { - privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer()); + privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer(32)); } } //TRX is different @@ -1419,6 +1419,12 @@ privkey = FIObufferToPrivate(keyPair.d.toBuffer(32)); } + if (networks[DOM.network.val()].name == "ATOM - Cosmos Hub") { + address = CosmosBufferToAddress(keyPair.getPublicKeyBuffer()); + pubkey = CosmosBufferToPublic(keyPair.getPublicKeyBuffer()); + privkey = keyPair.d.toBuffer().toString("base64"); + } + //Groestlcoin Addresses are different if(isGRS()) { @@ -2234,6 +2240,13 @@ setHdCoin(357); }, }, + { + name: "ATOM - Cosmos Hub", + onSelect: function() { + network = libs.bitcoin.networks.bitcoin; + setHdCoin(118); + }, + }, { name: "AUR - Auroracoin", onSelect: function() { @@ -3239,6 +3252,13 @@ setHdCoin(4); }, }, + { + name: "RITO - Ritocoin", + onSelect: function() { + network = libs.bitcoin.networks.ritocoin; + setHdCoin(19169); + }, + }, { name: "RVR - RevolutionVR", onSelect: function() {