aboutsummaryrefslogtreecommitdiff
path: root/src/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/index.js')
-rw-r--r--src/js/index.js32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/js/index.js b/src/js/index.js
index c610d29..bad4cfb 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -73,25 +73,21 @@
73 if (n == "bitcoin") { 73 if (n == "bitcoin") {
74 network = Bitcoin.networks.bitcoin; 74 network = Bitcoin.networks.bitcoin;
75 DOM.bip44coin.val(0); 75 DOM.bip44coin.val(0);
76 setBip44DerivationPath();
77 enableBip44Tab();
78 } 76 }
79 else if (n == "bitcoin-testnet") { 77 else if (n == "bitcoin-testnet") {
80 network = Bitcoin.networks.testnet; 78 network = Bitcoin.networks.testnet;
81 DOM.bip44coin.val(1); 79 DOM.bip44coin.val(1);
82 setBip44DerivationPath();
83 enableBip44Tab();
84 } 80 }
85 else if (n == "litecoin") { 81 else if (n == "litecoin") {
86 network = Bitcoin.networks.litecoin; 82 network = Bitcoin.networks.litecoin;
87 DOM.bip44coin.val(2); 83 DOM.bip44coin.val(2);
88 setBip44DerivationPath();
89 enableBip44Tab();
90 } 84 }
91 else if (n == "dogecoin") { 85 else if (n == "dogecoin") {
92 network = Bitcoin.networks.dogecoin; 86 network = Bitcoin.networks.dogecoin;
93 //disableBip44Tab(); 87 var NO_BIP44_VALUE = 9999;
88 DOM.bip44coin.val(NO_BIP44_VALUE); // This coin is not in BIP44
94 } 89 }
90 setBip44DerivationPath();
95 DOM.phraseNetwork.val(n); 91 DOM.phraseNetwork.val(n);
96 DOM.bip44Network.val(n); 92 DOM.bip44Network.val(n);
97 if(e.target != DOM.addressNetwork.dom){ 93 if(e.target != DOM.addressNetwork.dom){
@@ -410,28 +406,6 @@
410 .hide(); 406 .hide();
411 } 407 }
412 408
413 function enableBip44Tab() {
414 // show bip44 tab (but don't select it)
415 DOM.bip44tab.removeClass("hidden");
416 DOM.bip44panel.removeClass("hidden");
417 }
418
419 function disableBip44Tab() {
420 // hide bip44 tab
421 DOM.bip44tab.addClass("hidden");
422 DOM.bip44tab.removeClass("active");
423 // hide bip44 panel
424 DOM.bip44panel.addClass("hidden");
425 DOM.bip44panel.removeClass("active");
426 // show bip32 tab
427 DOM.bip32tab.addClass("active");
428 // show bip32 panel
429 DOM.bip32panel.addClass("active");
430 // set the derivation path
431 var activePath = $("#bip32 .path");
432 derivationPath = activePath.val();
433 }
434
435 init(); 409 init();
436 410
437})(); 411})();