From cd7c8327b110ee2fc2010d1e88f5009f859cd981 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Fri, 1 Sep 2017 12:27:03 +1000 Subject: [PATCH] Validate root key correctly for alternate networks --- src/js/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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"; -- 2.41.0