mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-18 08:22:16 +00:00
bip44TabSelected and bip32TabSelected functions
This is more descriptive than a blob of jquery, and simplifies reuse in the near future.
This commit is contained in:
@@ -388,7 +388,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getDerivationPath() {
|
function getDerivationPath() {
|
||||||
if (DOM.bip44tab.hasClass("active")) {
|
if (bip44TabSelected()) {
|
||||||
var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44);
|
var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44);
|
||||||
var coin = parseIntNoNaN(DOM.bip44coin.val(), 0);
|
var coin = parseIntNoNaN(DOM.bip44coin.val(), 0);
|
||||||
var account = parseIntNoNaN(DOM.bip44account.val(), 0);
|
var account = parseIntNoNaN(DOM.bip44account.val(), 0);
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
console.log("Using derivation path from BIP44 tab: " + derivationPath);
|
console.log("Using derivation path from BIP44 tab: " + derivationPath);
|
||||||
return derivationPath;
|
return derivationPath;
|
||||||
}
|
}
|
||||||
else if (DOM.bip32tab.hasClass("active")) {
|
else if (bip32TabSelected()) {
|
||||||
var derivationPath = DOM.bip32path.val();
|
var derivationPath = DOM.bip32path.val();
|
||||||
console.log("Using derivation path from BIP32 tab: " + derivationPath);
|
console.log("Using derivation path from BIP32 tab: " + derivationPath);
|
||||||
return derivationPath;
|
return derivationPath;
|
||||||
@@ -940,6 +940,14 @@
|
|||||||
DOM.qrHint.toggleClass("hidden");
|
DOM.qrHint.toggleClass("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bip44TabSelected() {
|
||||||
|
return DOM.bip44tab.hasClass("active");
|
||||||
|
}
|
||||||
|
|
||||||
|
function bip32TabSelected() {
|
||||||
|
return DOM.bip32tab.hasClass("active");
|
||||||
|
}
|
||||||
|
|
||||||
var networks = [
|
var networks = [
|
||||||
{
|
{
|
||||||
name: "Bitcoin",
|
name: "Bitcoin",
|
||||||
|
|||||||
Reference in New Issue
Block a user