diff options
author | iancoleman <1281387+iancoleman@users.noreply.github.com> | 2019-11-11 09:21:07 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-11 09:21:07 +1100 |
commit | 3dbf117928bb17d58cc54fa1faa9354c014e665b (patch) | |
tree | f3735716fbd1c66c89698461060715979e37df92 /src/js/index.js | |
parent | 342ff964aa63354694d659c183e2525aa0983a56 (diff) | |
parent | 611f76238dedd0418c79a0d918d46d2c92b0149c (diff) | |
download | BIP39-3dbf117928bb17d58cc54fa1faa9354c014e665b.tar.gz BIP39-3dbf117928bb17d58cc54fa1faa9354c014e665b.tar.zst BIP39-3dbf117928bb17d58cc54fa1faa9354c014e665b.zip |
Merge pull request #271 from cernekee/local
Allow converting mnemonic back to raw entropy value
Diffstat (limited to 'src/js/index.js')
-rw-r--r-- | src/js/index.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/js/index.js b/src/js/index.js index f3302a6..da901f6 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -232,7 +232,14 @@ | |||
232 | if (phraseChangeTimeoutEvent != null) { | 232 | if (phraseChangeTimeoutEvent != null) { |
233 | clearTimeout(phraseChangeTimeoutEvent); | 233 | clearTimeout(phraseChangeTimeoutEvent); |
234 | } | 234 | } |
235 | phraseChangeTimeoutEvent = setTimeout(phraseChanged, 400); | 235 | phraseChangeTimeoutEvent = setTimeout(function() { |
236 | phraseChanged(); | ||
237 | var entropy = mnemonic.toRawEntropyHex(DOM.phrase.val()); | ||
238 | if (entropy !== null) { | ||
239 | DOM.entropyMnemonicLength.val("raw"); | ||
240 | DOM.entropy.val(entropy); | ||
241 | } | ||
242 | }, 400); | ||
236 | } | 243 | } |
237 | 244 | ||
238 | function phraseChanged() { | 245 | function phraseChanged() { |