Entropy defaults to generating a 15 word mnemonic

This commit is contained in:
Ian Coleman
2016-11-25 14:34:11 +11:00
parent 886f06ee6b
commit 55b592b498
2 changed files with 6 additions and 1 deletions

View File

@@ -157,7 +157,7 @@
<select class="mnemonic-length form-control">
<option value="raw">From entropy length (3 words per 32 bits)</option>
<option value="12">12 Words</option>
<option value="15">15 Words</option>
<option value="15" selected>15 Words</option>
<option value="18">18 Words</option>
<option value="21">21 Words</option>
<option value="24">24 Words</option>

View File

@@ -2237,6 +2237,7 @@ page.open(url, function(status) {
// use entropy
page.evaluate(function() {
$(".use-entropy").prop("checked", true).trigger("change");
$(".mnemonic-length").val("raw");
$(".entropy").val("00000000 00000000 00000000 00000000").trigger("input");
});
// check the mnemonic is set and address is correct
@@ -2858,6 +2859,7 @@ page.open(url, function(status) {
// use entropy
page.evaluate(function() {
$(".use-entropy").prop("checked", true).trigger("change");
$(".mnemonic-length").val("raw");
});
var nextTest = function runNextTest(i) {
function getFeedbackError(expected, actual) {
@@ -2934,6 +2936,7 @@ page.open(url, function(status) {
// use entropy
page.evaluate(function() {
$(".use-entropy").prop("checked", true).trigger("change");
$(".mnemonic-length").val("raw");
var entropy = "00000000 00000000 00000000 00000000";
entropy += "11111111 11111111 11111111 1111"; // Missing last byte
$(".entropy").val(entropy).trigger("input");
@@ -2960,6 +2963,7 @@ page.open(url, function(status) {
// use entropy
page.evaluate(function() {
$(".use-entropy").prop("checked", true).trigger("change");
$(".mnemonic-length").val("raw");
var entropy = "";
// Generate a very long entropy string
for (var i=0; i<33; i++) {
@@ -2993,6 +2997,7 @@ page.open(url, function(status) {
// use entropy
page.evaluate(function() {
$(".use-entropy").prop("checked", true).trigger("change");
$(".mnemonic-length").val("raw");
var entropy = "543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543210543";
$(".entropy").val(entropy).trigger("input");
});