mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-06 02:43:49 +00:00
Show error when using xpub with hardened addresses
This commit is contained in:
@@ -532,7 +532,9 @@
|
||||
return "No root key";
|
||||
}
|
||||
// Check no hardened derivation path when using xpub keys
|
||||
var hardened = path.indexOf("'") > -1;
|
||||
var hardenedPath = path.indexOf("'") > -1;
|
||||
var hardenedAddresses = bip32TabSelected() && DOM.hardenedAddresses.prop("checked");
|
||||
var hardened = hardenedPath || hardenedAddresses;
|
||||
var isXpubkey = bip32RootKey.isNeutered();
|
||||
if (hardened && isXpubkey) {
|
||||
return "Hardened derivation path is invalid with xpub key";
|
||||
|
||||
Reference in New Issue
Block a user