+ function getDerivationPath() {
+ if (DOM.bip44tab.hasClass("active")) {
+ var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44);
+ var coin = parseIntNoNaN(DOM.bip44coin.val(), 0);
+ var account = parseIntNoNaN(DOM.bip44account.val(), 0);
+ var change = parseIntNoNaN(DOM.bip44change.val(), 0);
+ var path = "m/";
+ path += purpose + "'/";
+ path += coin + "'/";
+ path += account + "'/";
+ path += change;
+ DOM.bip44path.val(path);
+ var derivationPath = DOM.bip44path.val();
+ console.log("Using derivation path from BIP44 tab: " + derivationPath);
+ return derivationPath;
+ }
+ else if (DOM.bip32tab.hasClass("active")) {
+ var derivationPath = DOM.bip32path.val();
+ console.log("Using derivation path from BIP32 tab: " + derivationPath);
+ return derivationPath;
+ }
+ else {
+ console.log("Unknown derivation path");
+ }
+ }
+