]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - src/js/index.js
add SLP Token Type https://github.com/simpleledger/slp-specifications/blob/master...
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / src / js / index.js
index 8c23e615c26b484201f12af2abf215fa40975064..057d7093402b8f7d47359608a0903add76f06f22 100644 (file)
                         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) {
                 network = bitcoinjs.bitcoin.networks.blocknode;
                 setHdCoin(2941);
             },
-        },     
+        },
                {
             name: "tBND - Blocknode Testnet",
             onSelect: function() {
                 setHdCoin(111);
             },
         },
+        {
+            name: "SLP - Simple Ledger Protocol",
+            onSelect: function() {
+                DOM.bitcoinCashAddressTypeContainer.removeClass("hidden");
+                setHdCoin(245);
+            },
+        },
         {
             name: "SLR - Solarcoin",
             onSelect: function() {