mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-06 02:43:49 +00:00
Entropy defaults to generating a 15 word mnemonic
This commit is contained in:
@@ -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>
|
||||
|
||||
5
tests.js
5
tests.js
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user