]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Validate root key correctly for alternate networks
authorIan Coleman <coleman.ian@gmail.com>
Fri, 1 Sep 2017 02:27:03 +0000 (12:27 +1000)
committerIan Coleman <coleman.ian@gmail.com>
Fri, 1 Sep 2017 02:27:03 +0000 (12:27 +1000)
src/js/index.js

index 45c7cb1f26d69de969735171d234ec82057653b7..80e66092c99fc8d8934a92deb5e10117136ce0d1 100644 (file)
     function rootKeyChanged() {
         showPending();
         hideValidationError();
-        // Validate the root key TODO
         var rootKeyBase58 = DOM.rootKey.val();
         var errorText = validateRootKey(rootKeyBase58);
         if (errorText) {
 
     function validateRootKey(rootKeyBase58) {
         try {
-            bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58);
+            bitcoinjs.bitcoin.HDNode.fromBase58(rootKeyBase58, network);
         }
         catch (e) {
             return "Invalid root key";