From 9b5f4cc7dfc2831bb14b1ff11cc40c1ed06bb270 Mon Sep 17 00:00:00 2001 From: Robert Johnson Date: Tue, 14 Oct 2014 17:40:19 -0500 Subject: [PATCH] fix to switch bip44 coin type path for mycelium when switching between bitcoin and bitcoin-testnet --- bip39-standalone.html | 3 +++ src/js/index.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bip39-standalone.html b/bip39-standalone.html index 8733864..c015856 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html @@ -33893,6 +33893,7 @@ var Mnemonic = function(language) { DOM.indexToggle = $(".index-toggle"); DOM.addressToggle = $(".address-toggle"); DOM.privateKeyToggle = $(".private-key-toggle"); + DOM.myceliumPath = $("#mycelium-path"); var derivationPath = $(".tab-pane.active .path").val(); @@ -33924,10 +33925,12 @@ var Mnemonic = function(language) { if (n == "bitcoin") { network = Bitcoin.networks.bitcoin; DOM.bip44coin.val(0); + DOM.myceliumPath.val("m/44'/0'/0'/0"); } else if (n == "bitcoin-testnet") { network = Bitcoin.networks.testnet; DOM.bip44coin.val(1); + DOM.myceliumPath.val("m/44'/1'/0'/0"); } else if (n == "litecoin") { network = Bitcoin.networks.litecoin; diff --git a/src/js/index.js b/src/js/index.js index bc1682e..bbef50d 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -40,6 +40,7 @@ DOM.indexToggle = $(".index-toggle"); DOM.addressToggle = $(".address-toggle"); DOM.privateKeyToggle = $(".private-key-toggle"); + DOM.myceliumPath = $("#mycelium-path"); var derivationPath = $(".tab-pane.active .path").val(); @@ -71,10 +72,12 @@ if (n == "bitcoin") { network = Bitcoin.networks.bitcoin; DOM.bip44coin.val(0); + DOM.myceliumPath.val("m/44'/0'/0'/0"); } else if (n == "bitcoin-testnet") { network = Bitcoin.networks.testnet; DOM.bip44coin.val(1); + DOM.myceliumPath.val("m/44'/1'/0'/0"); } else if (n == "litecoin") { network = Bitcoin.networks.litecoin; -- 2.41.0