From: Ian Coleman Date: Fri, 1 Sep 2017 02:27:03 +0000 (+1000) Subject: Validate root key correctly for alternate networks X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=cd7c8327b110ee2fc2010d1e88f5009f859cd981 Validate root key correctly for alternate networks --- diff --git a/src/js/index.js b/src/js/index.js index 45c7cb1..80e6609 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -267,7 +267,6 @@ function rootKeyChanged() { showPending(); hideValidationError(); - // Validate the root key TODO var rootKeyBase58 = DOM.rootKey.val(); var errorText = validateRootKey(rootKeyBase58); if (errorText) { @@ -460,7 +459,7 @@ function validateRootKey(rootKeyBase58) { try { - bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58); + bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network); } catch (e) { return "Invalid root key";