X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjs%2Findex.js;h=057d7093402b8f7d47359608a0903add76f06f22;hb=d0889ab9dee263494bcf50dc6c5a25a249c8ffe1;hp=8c23e615c26b484201f12af2abf215fa40975064;hpb=478e54ad478c3c4c775f12f2e6bdfa0ca5947b18;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/src/js/index.js b/src/js/index.js index 8c23e61..057d709 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -952,6 +952,13 @@ address = bchaddr.toBitpayAddress(address); } } + // Bitcoin Cash address format may vary + if (networks[DOM.network.val()].name == "SLP - Simple Ledger Protocol") { + var bchAddrType = DOM.bitcoinCashAddressType.filter(":checked").val(); + if (bchAddrType == "cashaddr") { + address = bchaddr.toSlpAddress(address); + } + } // Segwit addresses are different if (isSegwit) { if (!segwitAvailable) { @@ -1718,7 +1725,7 @@ network = bitcoinjs.bitcoin.networks.blocknode; setHdCoin(2941); }, - }, + }, { name: "tBND - Blocknode Testnet", onSelect: function() { @@ -2486,6 +2493,13 @@ setHdCoin(111); }, }, + { + name: "SLP - Simple Ledger Protocol", + onSelect: function() { + DOM.bitcoinCashAddressTypeContainer.removeClass("hidden"); + setHdCoin(245); + }, + }, { name: "SLR - Solarcoin", onSelect: function() {