mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-23 10:50:41 +00:00
Merge pull request #271 from cernekee/local
Allow converting mnemonic back to raw entropy value
This commit is contained in:
+8
-1
@@ -232,7 +232,14 @@
|
||||
if (phraseChangeTimeoutEvent != null) {
|
||||
clearTimeout(phraseChangeTimeoutEvent);
|
||||
}
|
||||
phraseChangeTimeoutEvent = setTimeout(phraseChanged, 400);
|
||||
phraseChangeTimeoutEvent = setTimeout(function() {
|
||||
phraseChanged();
|
||||
var entropy = mnemonic.toRawEntropyHex(DOM.phrase.val());
|
||||
if (entropy !== null) {
|
||||
DOM.entropyMnemonicLength.val("raw");
|
||||
DOM.entropy.val(entropy);
|
||||
}
|
||||
}, 400);
|
||||
}
|
||||
|
||||
function phraseChanged() {
|
||||
|
||||
Reference in New Issue
Block a user