diff options
-rw-r--r-- | bip39-standalone.html | 4 | ||||
-rw-r--r-- | src/index.html | 4 | ||||
-rw-r--r-- | tests.js | 7 |
3 files changed, 5 insertions, 10 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html index 3b4f0f2..a2a90d3 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html | |||
@@ -186,9 +186,9 @@ | |||
186 | <label class="col-sm-3 control-label" data-translate>Mnemonic Length</label> | 186 | <label class="col-sm-3 control-label" data-translate>Mnemonic Length</label> |
187 | <div class="col-sm-9"> | 187 | <div class="col-sm-9"> |
188 | <select class="mnemonic-length form-control"> | 188 | <select class="mnemonic-length form-control"> |
189 | <option value="raw" data-translate>From entropy length (3 words per 32 bits)</option> | 189 | <option value="raw" selected data-translate>Use Raw Entropy (3 words per 32 bits)</option> |
190 | <option value="12">12 <span data-translate>Words</span></option> | 190 | <option value="12">12 <span data-translate>Words</span></option> |
191 | <option value="15" selected>15 <span data-translate>Words</option> | 191 | <option value="15">15 <span data-translate>Words</option> |
192 | <option value="18">18 <span data-translate>Words</span></option> | 192 | <option value="18">18 <span data-translate>Words</span></option> |
193 | <option value="21">21 <span data-translate>Words</span></option> | 193 | <option value="21">21 <span data-translate>Words</span></option> |
194 | <option value="24">24 <span data-translate>Words</span></option> | 194 | <option value="24">24 <span data-translate>Words</span></option> |
diff --git a/src/index.html b/src/index.html index 964746e..3c19b60 100644 --- a/src/index.html +++ b/src/index.html | |||
@@ -182,9 +182,9 @@ | |||
182 | <label class="col-sm-3 control-label" data-translate>Mnemonic Length</label> | 182 | <label class="col-sm-3 control-label" data-translate>Mnemonic Length</label> |
183 | <div class="col-sm-9"> | 183 | <div class="col-sm-9"> |
184 | <select class="mnemonic-length form-control"> | 184 | <select class="mnemonic-length form-control"> |
185 | <option value="raw" data-translate>From entropy length (3 words per 32 bits)</option> | 185 | <option value="raw" selected data-translate>Use Raw Entropy (3 words per 32 bits)</option> |
186 | <option value="12">12 <span data-translate>Words</span></option> | 186 | <option value="12">12 <span data-translate>Words</span></option> |
187 | <option value="15" selected>15 <span data-translate>Words</option> | 187 | <option value="15">15 <span data-translate>Words</option> |
188 | <option value="18">18 <span data-translate>Words</span></option> | 188 | <option value="18">18 <span data-translate>Words</span></option> |
189 | <option value="21">21 <span data-translate>Words</span></option> | 189 | <option value="21">21 <span data-translate>Words</span></option> |
190 | <option value="24">24 <span data-translate>Words</span></option> | 190 | <option value="24">24 <span data-translate>Words</span></option> |
@@ -2268,7 +2268,6 @@ page.open(url, function(status) { | |||
2268 | // use entropy | 2268 | // use entropy |
2269 | page.evaluate(function() { | 2269 | page.evaluate(function() { |
2270 | $(".use-entropy").prop("checked", true).trigger("change"); | 2270 | $(".use-entropy").prop("checked", true).trigger("change"); |
2271 | $(".mnemonic-length").val("raw"); | ||
2272 | $(".entropy").val("00000000 00000000 00000000 00000000").trigger("input"); | 2271 | $(".entropy").val("00000000 00000000 00000000 00000000").trigger("input"); |
2273 | }); | 2272 | }); |
2274 | // check the mnemonic is set and address is correct | 2273 | // check the mnemonic is set and address is correct |
@@ -2804,7 +2803,6 @@ page.open(url, function(status) { | |||
2804 | // use entropy | 2803 | // use entropy |
2805 | page.evaluate(function() { | 2804 | page.evaluate(function() { |
2806 | $(".use-entropy").prop("checked", true).trigger("change"); | 2805 | $(".use-entropy").prop("checked", true).trigger("change"); |
2807 | $(".mnemonic-length").val("raw"); | ||
2808 | }); | 2806 | }); |
2809 | var nextTest = function runNextTest(i) { | 2807 | var nextTest = function runNextTest(i) { |
2810 | function getFeedbackError(expected, actual) { | 2808 | function getFeedbackError(expected, actual) { |
@@ -2886,7 +2884,6 @@ page.open(url, function(status) { | |||
2886 | // use entropy | 2884 | // use entropy |
2887 | page.evaluate(function() { | 2885 | page.evaluate(function() { |
2888 | $(".use-entropy").prop("checked", true).trigger("change"); | 2886 | $(".use-entropy").prop("checked", true).trigger("change"); |
2889 | $(".mnemonic-length").val("raw"); | ||
2890 | var entropy = "00000000 00000000 00000000 00000000"; | 2887 | var entropy = "00000000 00000000 00000000 00000000"; |
2891 | entropy += "11111111 11111111 11111111 1111"; // Missing last byte | 2888 | entropy += "11111111 11111111 11111111 1111"; // Missing last byte |
2892 | $(".entropy").val(entropy).trigger("input"); | 2889 | $(".entropy").val(entropy).trigger("input"); |
@@ -2913,7 +2910,6 @@ page.open(url, function(status) { | |||
2913 | // use entropy | 2910 | // use entropy |
2914 | page.evaluate(function() { | 2911 | page.evaluate(function() { |
2915 | $(".use-entropy").prop("checked", true).trigger("change"); | 2912 | $(".use-entropy").prop("checked", true).trigger("change"); |
2916 | $(".mnemonic-length").val("raw"); | ||
2917 | var entropy = ""; | 2913 | var entropy = ""; |
2918 | // Generate a very long entropy string | 2914 | // Generate a very long entropy string |
2919 | for (var i=0; i<33; i++) { | 2915 | for (var i=0; i<33; i++) { |
@@ -2947,7 +2943,6 @@ page.open(url, function(status) { | |||
2947 | // use entropy | 2943 | // use entropy |
2948 | page.evaluate(function() { | 2944 | page.evaluate(function() { |
2949 | $(".use-entropy").prop("checked", true).trigger("change"); | 2945 | $(".use-entropy").prop("checked", true).trigger("change"); |
2950 | $(".mnemonic-length").val("raw"); | ||
2951 | var entropy = "543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543"; | 2946 | var entropy = "543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543"; |
2952 | $(".entropy").val(entropy).trigger("input"); | 2947 | $(".entropy").val(entropy).trigger("input"); |
2953 | }); | 2948 | }); |
@@ -3039,7 +3034,6 @@ page.open(url, function(status) { | |||
3039 | // use entropy | 3034 | // use entropy |
3040 | page.evaluate(function() { | 3035 | page.evaluate(function() { |
3041 | $(".use-entropy").prop("checked", true).trigger("change"); | 3036 | $(".use-entropy").prop("checked", true).trigger("change"); |
3042 | $(".mnemonic-length").val("raw"); | ||
3043 | $(".entropy").val("7S 9H 9S QH 8C KS AS 7D 7C QD 4S 4D TC 2D 5S JS 3D 8S 8H 4C 3C AC 3S QC 9C JC 7H AD TD JD 6D KH 5C QS 2S 6S 6H JH KD 9D-6C TS TH 4H KC 5H 2H AH 2C 8D 3H 5D").trigger("input"); | 3037 | $(".entropy").val("7S 9H 9S QH 8C KS AS 7D 7C QD 4S 4D TC 2D 5S JS 3D 8S 8H 4C 3C AC 3S QC 9C JC 7H AD TD JD 6D KH 5C QS 2S 6S 6H JH KD 9D-6C TS TH 4H KC 5H 2H AH 2C 8D 3H 5D").trigger("input"); |
3044 | }); | 3038 | }); |
3045 | // get the mnemonic | 3039 | // get the mnemonic |
@@ -3345,6 +3339,7 @@ page.open(url, function(status) { | |||
3345 | // use entropy | 3339 | // use entropy |
3346 | page.evaluate(function() { | 3340 | page.evaluate(function() { |
3347 | $(".use-entropy").prop("checked", true).trigger("change"); | 3341 | $(".use-entropy").prop("checked", true).trigger("change"); |
3342 | $(".mnemonic-length").val("15"); | ||
3348 | $(".entropy").val("1111").trigger("input"); | 3343 | $(".entropy").val("1111").trigger("input"); |
3349 | }); | 3344 | }); |
3350 | waitForGenerate(function() { | 3345 | waitForGenerate(function() { |