]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - src/js/index.js
Merge pull request #15 from dooglus/clam
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / src / js / index.js
index 5eb4b29cc56019c03acbe4d0f1b7d0319b56f636..0a662a81e8e69d05e961fb04e72a32ef452101b8 100644 (file)
@@ -40,7 +40,6 @@
     DOM.indexToggle = $(".index-toggle");
     DOM.addressToggle = $(".address-toggle");
     DOM.privateKeyToggle = $(".private-key-toggle");
-    DOM.myceliumPath = $("#mycelium-path");
 
     var derivationPath = $(".tab-pane.active .path").val();
 
 
     function bip44Changed() {
         setBip44DerivationPath();
-        derivationPath = DOM.bip44path.val();
         derivationChanged();
     }
 
         var addressCell = row.find(".address span");
         var privkeyCell = row.find(".privkey span");
         // Content
-        indexCell.text(index);
+        var indexText = derivationPath + "/" + index;
+        indexCell.text(indexText);
         addressCell.text(address);
         privkeyCell.text(privkey);
         // Visibility
             addressCell.addClass("invisible");
         }
         if (!showPrivKey) {
-            privkeCell.addClass("invisible");
+            privkeyCell.addClass("invisible");
         }
         DOM.addresses.append(row);
     }
         path += account + "'/";
         path += change;
         DOM.bip44path.val(path);
+        derivationPath = DOM.bip44path.val();
     }
 
     function parseIntNoNaN(val, defaultVal) {
             onSelect: function() {
                 network = bitcoin.networks.bitcoin;
                 DOM.bip44coin.val(0);
-                DOM.myceliumPath.val("m/44'/0'/0'/0");
             },
         },
         {
             onSelect: function() {
                 network = bitcoin.networks.testnet;
                 DOM.bip44coin.val(1);
-                DOM.myceliumPath.val("m/44'/1'/0'/0");
             },
         },
         {
                 DOM.bip44coin.val(3);
             },
         },
+        {
+            name: "ShadowCash",
+            onSelect: function() {
+                network = bitcoin.networks.shadow;
+                DOM.bip44coin.val(35);
+            },
+        },
+        {
+            name: "ShadowCash Testnet",
+            onSelect: function() {
+                network = bitcoin.networks.shadowtn;
+                DOM.bip44coin.val(1);
+            },
+        },
+        {
+            name: "Viacoin",
+            onSelect: function() {
+                network = bitcoin.networks.viacoin;
+                DOM.bip44coin.val(14);
+            },
+        },
+        {
+            name: "Viacoin Testnet",
+            onSelect: function() {
+                network = bitcoin.networks.viacointestnet;
+                DOM.bip44coin.val(1);
+            },
+        },
+        {
+            name: "Jumbucks",
+            onSelect: function() {
+                network = bitcoin.networks.jumbucks;
+                DOM.bip44coin.val(26);
+            },
+        },
+        {
+            name: "CLAM",
+            onSelect: function() {
+                network = bitcoin.networks.clam;
+                DOM.bip44coin.val(23);
+            },
+        },
     ]
 
     init();