]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - bip39-standalone.html
Merge pull request #92 from jonspock/master
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / bip39-standalone.html
index c828bdcfcb4d2f6e42baa4388dc5324e0750d8a6..f1837776d0a20a1931591c2ad6d2d92050c8a8b1 100644 (file)
         <div class="container">
 
             <h1 class="text-center">Mnemonic Code Converter</h1>
-            <p class="version">v0.2.1</p>
+            <p class="version">v0.2.2</p>
             <hr>
             <div class="row">
                 <div class="col-md-12">
@@ -46272,6 +46272,10 @@ window.Entropy = new (function() {
 
     function delayedPhraseChanged() {
         hideValidationError();
+        seed = null;
+        bip32RootKey = null;
+        bip32ExtendedKey = null;
+        clearAddressesList();
         showPending();
         if (phraseChangeTimeoutEvent != null) {
             clearTimeout(phraseChangeTimeoutEvent);
@@ -46281,7 +46285,6 @@ window.Entropy = new (function() {
 
     function phraseChanged() {
         showPending();
-        hideValidationError();
         setMnemonicLanguage();
         // Get the mnemonic phrase
         var phrase = DOM.phrase.val();
@@ -46294,7 +46297,6 @@ window.Entropy = new (function() {
         var passphrase = DOM.passphrase.val();
         calcBip32RootKeyFromSeed(phrase, passphrase);
         calcForDerivationPath();
-        hidePending();
     }
 
     function delayedEntropyChanged() {
@@ -46370,10 +46372,9 @@ window.Entropy = new (function() {
     }
 
     function calcForDerivationPath() {
-        showPending();
         clearDerivedKeys();
         clearAddressesList();
-        hideValidationError();
+        showPending();
         // Don't show bip49 if it's selected but network doesn't support it
         if (bip49TabSelected() && !networkHasBip49()) {
             return;
@@ -46393,7 +46394,6 @@ window.Entropy = new (function() {
             displayBip49Info();
         }
         displayBip32Info();
-        hidePending();
     }
 
     function generateClicked() {
@@ -46700,17 +46700,19 @@ window.Entropy = new (function() {
                 for (var i=0; i<rows.length; i++) {
                     rows[i].shouldGenerate = false;
                 }
+                hidePending();
             }
 
             for (var i=0; i<total; i++) {
                 var index = i + start;
-                rows.push(new TableRow(index));
+                var isLast = i == total - 1;
+                rows.push(new TableRow(index, isLast));
             }
 
         })());
     }
 
-    function TableRow(index) {
+    function TableRow(index, isLast) {
 
         var self = this;
         this.shouldGenerate = true;
@@ -46772,6 +46774,9 @@ window.Entropy = new (function() {
                     address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network)
                 }
                 addAddressToList(indexText, address, pubkey, privkey);
+                if (isLast) {
+                    hidePending();
+                }
             }, 50)
         }