mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-18 16:32:18 +00:00
Revert "Update only happens when phrase is changed"
This reverts commit 04f789cdbd.
This commit is contained in:
@@ -22733,8 +22733,6 @@ WORDLISTS = {
|
|||||||
DOM.privateKeyToggle = $(".private-key-toggle");
|
DOM.privateKeyToggle = $(".private-key-toggle");
|
||||||
|
|
||||||
var derivationPath = DOM.bip44path.val();
|
var derivationPath = DOM.bip44path.val();
|
||||||
var currentPhrase = DOM.phrase.val();
|
|
||||||
var currentPassphrase = DOM.passphrase.val();
|
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
// Events
|
// Events
|
||||||
@@ -22759,9 +22757,6 @@ WORDLISTS = {
|
|||||||
// Event handlers
|
// Event handlers
|
||||||
|
|
||||||
function delayedPhraseChanged() {
|
function delayedPhraseChanged() {
|
||||||
if (!hasChanged()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hideValidationError();
|
hideValidationError();
|
||||||
showPending();
|
showPending();
|
||||||
if (phraseChangeTimeoutEvent != null) {
|
if (phraseChangeTimeoutEvent != null) {
|
||||||
@@ -22791,9 +22786,6 @@ WORDLISTS = {
|
|||||||
calcBip32Seed(phrase, passphrase, derivationPath);
|
calcBip32Seed(phrase, passphrase, derivationPath);
|
||||||
displayBip32Info();
|
displayBip32Info();
|
||||||
hidePending();
|
hidePending();
|
||||||
// Set current state so we only update as needed
|
|
||||||
currentPhrase = phrase;
|
|
||||||
currentPassphrase = passphrase;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateClicked() {
|
function generateClicked() {
|
||||||
@@ -22815,9 +22807,7 @@ WORDLISTS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function derivationChanged() {
|
function derivationChanged() {
|
||||||
hideValidationError();
|
delayedPhraseChanged();
|
||||||
showPending();
|
|
||||||
setTimeout(phraseChanged, 50);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function bip32Changed() {
|
function bip32Changed() {
|
||||||
@@ -23046,12 +23036,6 @@ WORDLISTS = {
|
|||||||
.hide();
|
.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasChanged() {
|
|
||||||
var phraseChanged = DOM.phrase.val() != currentPhrase;
|
|
||||||
var passphraseChanged = DOM.passphrase.val() != currentPassphrase;
|
|
||||||
return phraseChanged || passphraseChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -32,8 +32,6 @@
|
|||||||
DOM.privateKeyToggle = $(".private-key-toggle");
|
DOM.privateKeyToggle = $(".private-key-toggle");
|
||||||
|
|
||||||
var derivationPath = DOM.bip44path.val();
|
var derivationPath = DOM.bip44path.val();
|
||||||
var currentPhrase = DOM.phrase.val();
|
|
||||||
var currentPassphrase = DOM.passphrase.val();
|
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
// Events
|
// Events
|
||||||
@@ -58,9 +56,6 @@
|
|||||||
// Event handlers
|
// Event handlers
|
||||||
|
|
||||||
function delayedPhraseChanged() {
|
function delayedPhraseChanged() {
|
||||||
if (!hasChanged()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hideValidationError();
|
hideValidationError();
|
||||||
showPending();
|
showPending();
|
||||||
if (phraseChangeTimeoutEvent != null) {
|
if (phraseChangeTimeoutEvent != null) {
|
||||||
@@ -90,9 +85,6 @@
|
|||||||
calcBip32Seed(phrase, passphrase, derivationPath);
|
calcBip32Seed(phrase, passphrase, derivationPath);
|
||||||
displayBip32Info();
|
displayBip32Info();
|
||||||
hidePending();
|
hidePending();
|
||||||
// Set current state so we only update as needed
|
|
||||||
currentPhrase = phrase;
|
|
||||||
currentPassphrase = passphrase;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateClicked() {
|
function generateClicked() {
|
||||||
@@ -114,9 +106,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function derivationChanged() {
|
function derivationChanged() {
|
||||||
hideValidationError();
|
delayedPhraseChanged();
|
||||||
showPending();
|
|
||||||
setTimeout(phraseChanged, 50);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function bip32Changed() {
|
function bip32Changed() {
|
||||||
@@ -345,12 +335,6 @@
|
|||||||
.hide();
|
.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasChanged() {
|
|
||||||
var phraseChanged = DOM.phrase.val() != currentPhrase;
|
|
||||||
var passphraseChanged = DOM.passphrase.val() != currentPassphrase;
|
|
||||||
return phraseChanged || passphraseChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user