X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fjs%2Findex.js;h=c502208d3b468737c3cc1f86d059434e5ba9de1d;hb=a362ff2f626b8dbf0302c1d55a55ccd3ee2da221;hp=713b5e847c1a5da4046d89fccd790ca03e58c425;hpb=545348d1594a428a604614b480a271f6450bf47a;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/src/js/index.js b/src/js/index.js index 713b5e8..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() {