diff options
author | Ian Coleman <ian@iancoleman.io> | 2019-11-11 10:31:14 +1100 |
---|---|---|
committer | Ian Coleman <ian@iancoleman.io> | 2019-11-11 10:31:14 +1100 |
commit | 700294714c39cb6e8226b960671a33dc93362edc (patch) | |
tree | ccd935208aed75efa1de3798d3a83e68157139e7 /tests | |
parent | d93f2ba9f074464f5e20f9711563ff08e3eb19a6 (diff) | |
download | BIP39-700294714c39cb6e8226b960671a33dc93362edc.tar.gz BIP39-700294714c39cb6e8226b960671a33dc93362edc.tar.zst BIP39-700294714c39cb6e8226b960671a33dc93362edc.zip |
Raw entropy is interpreted as binary
For example, using abandon abandon ability becomes 8 zeros but how does
the entropy field know it's hex and not binary? It assumes the
worst-case scenario of binary, so entropy should be shown in binary.
Perhaps if entropy type is explicitly selected in the future this can be
changed back to using hex. But while magical assumptions exist, binary
it must be.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/spec/tests.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 977294c..07918c2 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js | |||
@@ -4129,8 +4129,13 @@ fit('Converts mnemonics into raw entropy', function(done) { | |||
4129 | driver.findElement(By.css('.entropy')) | 4129 | driver.findElement(By.css('.entropy')) |
4130 | .getAttribute("value") | 4130 | .getAttribute("value") |
4131 | .then(function(entropy) { | 4131 | .then(function(entropy) { |
4132 | expect(entropy).toBe("00000001"); | 4132 | expect(entropy).toBe("00000000000000000000000000000001"); |
4133 | done(); | 4133 | driver.findElement(By.css('.phrase')) |
4134 | .getAttribute("value") | ||
4135 | .then(function(phrase) { | ||
4136 | expect(phrase).toBe("abandon abandon about"); | ||
4137 | done(); | ||
4138 | }); | ||
4134 | }); | 4139 | }); |
4135 | }); | 4140 | }); |
4136 | }); | 4141 | }); |