aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bip39-standalone.html18
-rw-r--r--src/js/index.js18
2 files changed, 2 insertions, 34 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html
index 9bc6e88..591cdce 100644
--- a/bip39-standalone.html
+++ b/bip39-standalone.html
@@ -22733,8 +22733,6 @@ WORDLISTS = {
22733 DOM.privateKeyToggle = $(".private-key-toggle"); 22733 DOM.privateKeyToggle = $(".private-key-toggle");
22734 22734
22735 var derivationPath = DOM.bip44path.val(); 22735 var derivationPath = DOM.bip44path.val();
22736 var currentPhrase = DOM.phrase.val();
22737 var currentPassphrase = DOM.passphrase.val();
22738 22736
22739 function init() { 22737 function init() {
22740 // Events 22738 // Events
@@ -22759,9 +22757,6 @@ WORDLISTS = {
22759 // Event handlers 22757 // Event handlers
22760 22758
22761 function delayedPhraseChanged() { 22759 function delayedPhraseChanged() {
22762 if (!hasChanged()) {
22763 return;
22764 }
22765 hideValidationError(); 22760 hideValidationError();
22766 showPending(); 22761 showPending();
22767 if (phraseChangeTimeoutEvent != null) { 22762 if (phraseChangeTimeoutEvent != null) {
@@ -22791,9 +22786,6 @@ WORDLISTS = {
22791 calcBip32Seed(phrase, passphrase, derivationPath); 22786 calcBip32Seed(phrase, passphrase, derivationPath);
22792 displayBip32Info(); 22787 displayBip32Info();
22793 hidePending(); 22788 hidePending();
22794 // Set current state so we only update as needed
22795 currentPhrase = phrase;
22796 currentPassphrase = passphrase;
22797 } 22789 }
22798 22790
22799 function generateClicked() { 22791 function generateClicked() {
@@ -22815,9 +22807,7 @@ WORDLISTS = {
22815 } 22807 }
22816 22808
22817 function derivationChanged() { 22809 function derivationChanged() {
22818 hideValidationError(); 22810 delayedPhraseChanged();
22819 showPending();
22820 setTimeout(phraseChanged, 50);
22821 } 22811 }
22822 22812
22823 function bip32Changed() { 22813 function bip32Changed() {
@@ -23046,12 +23036,6 @@ WORDLISTS = {
23046 .hide(); 23036 .hide();
23047 } 23037 }
23048 23038
23049 function hasChanged() {
23050 var phraseChanged = DOM.phrase.val() != currentPhrase;
23051 var passphraseChanged = DOM.passphrase.val() != currentPassphrase;
23052 return phraseChanged || passphraseChanged;
23053 }
23054
23055 init(); 23039 init();
23056 23040
23057})(); 23041})();
diff --git a/src/js/index.js b/src/js/index.js
index 5bdb7ab..cee8ffb 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -32,8 +32,6 @@
32 DOM.privateKeyToggle = $(".private-key-toggle"); 32 DOM.privateKeyToggle = $(".private-key-toggle");
33 33
34 var derivationPath = DOM.bip44path.val(); 34 var derivationPath = DOM.bip44path.val();
35 var currentPhrase = DOM.phrase.val();
36 var currentPassphrase = DOM.passphrase.val();
37 35
38 function init() { 36 function init() {
39 // Events 37 // Events
@@ -58,9 +56,6 @@
58 // Event handlers 56 // Event handlers
59 57
60 function delayedPhraseChanged() { 58 function delayedPhraseChanged() {
61 if (!hasChanged()) {
62 return;
63 }
64 hideValidationError(); 59 hideValidationError();
65 showPending(); 60 showPending();
66 if (phraseChangeTimeoutEvent != null) { 61 if (phraseChangeTimeoutEvent != null) {
@@ -90,9 +85,6 @@
90 calcBip32Seed(phrase, passphrase, derivationPath); 85 calcBip32Seed(phrase, passphrase, derivationPath);
91 displayBip32Info(); 86 displayBip32Info();
92 hidePending(); 87 hidePending();
93 // Set current state so we only update as needed
94 currentPhrase = phrase;
95 currentPassphrase = passphrase;
96 } 88 }
97 89
98 function generateClicked() { 90 function generateClicked() {
@@ -114,9 +106,7 @@
114 } 106 }
115 107
116 function derivationChanged() { 108 function derivationChanged() {
117 hideValidationError(); 109 delayedPhraseChanged();
118 showPending();
119 setTimeout(phraseChanged, 50);
120 } 110 }
121 111
122 function bip32Changed() { 112 function bip32Changed() {
@@ -345,12 +335,6 @@
345 .hide(); 335 .hide();
346 } 336 }
347 337
348 function hasChanged() {
349 var phraseChanged = DOM.phrase.val() != currentPhrase;
350 var passphraseChanged = DOM.passphrase.val() != currentPassphrase;
351 return phraseChanged || passphraseChanged;
352 }
353
354 init(); 338 init();
355 339
356})(); 340})();