aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2017-08-24 09:25:26 +1000
committerIan Coleman <coleman.ian@gmail.com>2017-08-24 09:37:21 +1000
commitb18eb97ae367e7eaa276a8ddbaaca3e158cf153d (patch)
tree0e83bbc1238bf04be067991ce2b922b658fc6548 /src
parent88ea3e40eeed3b297899041dc590ca80c6a8b90a (diff)
downloadBIP39-b18eb97ae367e7eaa276a8ddbaaca3e158cf153d.tar.gz
BIP39-b18eb97ae367e7eaa276a8ddbaaca3e158cf153d.tar.zst
BIP39-b18eb97ae367e7eaa276a8ddbaaca3e158cf153d.zip
Show error when using xpub with hardened addresses
Diffstat (limited to 'src')
-rw-r--r--src/js/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/index.js b/src/js/index.js
index 3a5a0ef..d9d5db3 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -532,7 +532,9 @@
532 return "No root key"; 532 return "No root key";
533 } 533 }
534 // Check no hardened derivation path when using xpub keys 534 // Check no hardened derivation path when using xpub keys
535 var hardened = path.indexOf("'") > -1; 535 var hardenedPath = path.indexOf("'") > -1;
536 var hardenedAddresses = bip32TabSelected() && DOM.hardenedAddresses.prop("checked");
537 var hardened = hardenedPath || hardenedAddresses;
536 var isXpubkey = bip32RootKey.isNeutered(); 538 var isXpubkey = bip32RootKey.isNeutered();
537 if (hardened && isXpubkey) { 539 if (hardened && isXpubkey) {
538 return "Hardened derivation path is invalid with xpub key"; 540 return "Hardened derivation path is invalid with xpub key";