]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - src/js/index.js
Coin selection is done from a single control
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / src / js / index.js
index c610d29d436cb38e98293357c573a674901c19ed..0ce039a0ab05d27a3cc93f28fce5c784d70bbc04 100644 (file)
@@ -15,8 +15,6 @@
     var DOM = {};
     DOM.network = $(".network");
     DOM.phraseNetwork = $("#network-phrase");
-    DOM.bip44Network = $("#network-bip44");
-    DOM.addressNetwork = $("#network-address-type");
     DOM.phrase = $(".phrase");
     DOM.passphrase = $(".passphrase");
     DOM.generate = $(".generate");
         if (n == "bitcoin") {
             network = Bitcoin.networks.bitcoin;
             DOM.bip44coin.val(0);
-            setBip44DerivationPath();
-            enableBip44Tab();
         }
         else if (n == "bitcoin-testnet") {
             network = Bitcoin.networks.testnet;
             DOM.bip44coin.val(1);
-            setBip44DerivationPath();
-            enableBip44Tab();
         }
         else if (n == "litecoin") {
             network = Bitcoin.networks.litecoin;
             DOM.bip44coin.val(2);
-            setBip44DerivationPath();
-            enableBip44Tab();
         }
         else if (n == "dogecoin") {
             network = Bitcoin.networks.dogecoin;
-            //disableBip44Tab();
-        }
-        DOM.phraseNetwork.val(n);
-        DOM.bip44Network.val(n);
-        if(e.target != DOM.addressNetwork.dom){
-            DOM.addressNetwork.val(n);
+            var UNOFFICIAL_BIP44_COIN = 9999;
+            DOM.bip44coin.val(UNOFFICIAL_BIP44_COIN); // This coin is not in BIP44
         }
+        setBip44DerivationPath();
         delayedPhraseChanged();
     }
 
             .hide();
     }
 
-    function enableBip44Tab() {
-        // show bip44 tab (but don't select it)
-        DOM.bip44tab.removeClass("hidden");
-        DOM.bip44panel.removeClass("hidden");
-    }
-
-    function disableBip44Tab() {
-        // hide bip44 tab
-        DOM.bip44tab.addClass("hidden");
-        DOM.bip44tab.removeClass("active");
-        // hide bip44 panel
-        DOM.bip44panel.addClass("hidden");
-        DOM.bip44panel.removeClass("active");
-        // show bip32 tab
-        DOM.bip32tab.addClass("active");
-        // show bip32 panel
-        DOM.bip32panel.addClass("active");
-        // set the derivation path
-        var activePath = $("#bip32 .path");
-        derivationPath = activePath.val();
-    }
-
     init();
 
 })();