diff options
-rw-r--r-- | src/js/index.js | 4 | ||||
-rw-r--r-- | tests/spec/tests.js | 2 |
2 files changed, 4 insertions, 2 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 | } |
diff --git a/tests/spec/tests.js b/tests/spec/tests.js index bdc5909..fefb8b7 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js | |||
@@ -4243,7 +4243,7 @@ it('Converts mnemonics into raw entropy', function(done) { | |||
4243 | driver.findElement(By.css('.entropy')) | 4243 | driver.findElement(By.css('.entropy')) |
4244 | .getAttribute("value") | 4244 | .getAttribute("value") |
4245 | .then(function(entropy) { | 4245 | .then(function(entropy) { |
4246 | expect(entropy).toBe("00000000000000000000000000000001"); | 4246 | expect(entropy).toBe("00000001"); |
4247 | driver.findElement(By.css('.phrase')) | 4247 | driver.findElement(By.css('.phrase')) |
4248 | .getAttribute("value") | 4248 | .getAttribute("value") |
4249 | .then(function(phrase) { | 4249 | .then(function(phrase) { |