aboutsummaryrefslogtreecommitdiff
path: root/src/js/index.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2014-09-25 10:39:06 +1000
committerIan Coleman <coleman.ian@gmail.com>2014-09-25 10:39:06 +1000
commit59780293832d7a27d34378d4e47e7995f7d154a0 (patch)
tree4ba534f3d53370816d3abec64e0d5b9f73905942 /src/js/index.js
parent04f789cdbdb8e50511efdf97c900f7f83662eedb (diff)
downloadBIP39-59780293832d7a27d34378d4e47e7995f7d154a0.tar.gz
BIP39-59780293832d7a27d34378d4e47e7995f7d154a0.tar.zst
BIP39-59780293832d7a27d34378d4e47e7995f7d154a0.zip
Revert "Update only happens when phrase is changed"
This reverts commit 04f789cdbdb8e50511efdf97c900f7f83662eedb.
Diffstat (limited to 'src/js/index.js')
-rw-r--r--src/js/index.js18
1 files changed, 1 insertions, 17 deletions
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})();