diff options
author | Ian Coleman <ian@iancoleman.io> | 2019-12-18 09:07:17 +1100 |
---|---|---|
committer | Ian Coleman <ian@iancoleman.io> | 2019-12-18 09:07:17 +1100 |
commit | 244c76022af53c1f5b337a5a2cdb70358cf85e19 (patch) | |
tree | 160e7ac0b4235b81c4ffb237af0ce15971f466b6 /src/js | |
parent | 516c16d721db88b4b2c39964e2d5e8f6310c7bff (diff) | |
download | BIP39-244c76022af53c1f5b337a5a2cdb70358cf85e19.tar.gz BIP39-244c76022af53c1f5b337a5a2cdb70358cf85e19.tar.zst BIP39-244c76022af53c1f5b337a5a2cdb70358cf85e19.zip |
Convert mnemonic to hex entropy instead of binary
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/index.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/index.js b/src/js/index.js index 3db0a31..c9e7b44 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -239,10 +239,12 @@ | |||
239 | } | 239 | } |
240 | phraseChangeTimeoutEvent = setTimeout(function() { | 240 | phraseChangeTimeoutEvent = setTimeout(function() { |
241 | phraseChanged(); | 241 | phraseChanged(); |
242 | var entropy = mnemonic.toRawEntropyBin(DOM.phrase.val()); | 242 | var entropy = mnemonic.toRawEntropyHex(DOM.phrase.val()); |
243 | if (entropy !== null) { | 243 | if (entropy !== null) { |
244 | DOM.entropyMnemonicLength.val("raw"); | 244 | DOM.entropyMnemonicLength.val("raw"); |
245 | DOM.entropy.val(entropy); | 245 | DOM.entropy.val(entropy); |
246 | DOM.entropyTypeInputs.filter("[value='hexadecimal']").prop("checked", true); | ||
247 | entropyTypeAutoDetect = false; | ||
246 | } | 248 | } |
247 | }, 400); | 249 | }, 400); |
248 | } | 250 | } |