aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Coleman <ian@iancoleman.io>2019-12-18 09:07:17 +1100
committerIan Coleman <ian@iancoleman.io>2019-12-18 09:07:17 +1100
commit244c76022af53c1f5b337a5a2cdb70358cf85e19 (patch)
tree160e7ac0b4235b81c4ffb237af0ce15971f466b6 /src
parent516c16d721db88b4b2c39964e2d5e8f6310c7bff (diff)
downloadBIP39-244c76022af53c1f5b337a5a2cdb70358cf85e19.tar.gz
BIP39-244c76022af53c1f5b337a5a2cdb70358cf85e19.tar.zst
BIP39-244c76022af53c1f5b337a5a2cdb70358cf85e19.zip
Convert mnemonic to hex entropy instead of binary
Diffstat (limited to 'src')
-rw-r--r--src/js/index.js4
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 }