]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Raw Entropy is the default for mnemonic length
authorIan Coleman <coleman.ian@gmail.com>
Fri, 10 Feb 2017 07:08:18 +0000 (18:08 +1100)
committerIan Coleman <coleman.ian@gmail.com>
Fri, 10 Feb 2017 07:09:13 +0000 (18:09 +1100)
bip39-standalone.html
src/index.html
tests.js

index 3b4f0f27de389dab22a7e9812380e3754fc69abd..a2a90d34278790ec8e19057ad7a6fa33d5c814c6 100644 (file)
                                     <label class="col-sm-3 control-label" data-translate>Mnemonic Length</label>
                                     <div class="col-sm-9">
                                         <select class="mnemonic-length form-control">
-                                            <option value="raw" data-translate>From entropy length (3 words per 32 bits)</option>
+                                            <option value="raw" selected data-translate>Use Raw Entropy (3 words per 32 bits)</option>
                                             <option value="12">12 <span data-translate>Words</span></option>
-                                            <option value="15" selected>15 <span data-translate>Words</option>
+                                            <option value="15">15 <span data-translate>Words</option>
                                             <option value="18">18 <span data-translate>Words</span></option>
                                             <option value="21">21 <span data-translate>Words</span></option>
                                             <option value="24">24 <span data-translate>Words</span></option>
index 964746eed0a64bba12deaf7406721c7e2429958e..3c19b609ca60a607af02d5a396998c897d459093 100644 (file)
                                     <label class="col-sm-3 control-label" data-translate>Mnemonic Length</label>
                                     <div class="col-sm-9">
                                         <select class="mnemonic-length form-control">
-                                            <option value="raw" data-translate>From entropy length (3 words per 32 bits)</option>
+                                            <option value="raw" selected data-translate>Use Raw Entropy (3 words per 32 bits)</option>
                                             <option value="12">12 <span data-translate>Words</span></option>
-                                            <option value="15" selected>15 <span data-translate>Words</option>
+                                            <option value="15">15 <span data-translate>Words</option>
                                             <option value="18">18 <span data-translate>Words</span></option>
                                             <option value="21">21 <span data-translate>Words</span></option>
                                             <option value="24">24 <span data-translate>Words</span></option>
index a3c3f57956e3e810498fb22baa51a57a65687557..ace2fbb1f73e21be8692c34dbd351bace4158f26 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -2268,7 +2268,6 @@ 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
@@ -2804,7 +2803,6 @@ 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) {
@@ -2886,7 +2884,6 @@ 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");
@@ -2913,7 +2910,6 @@ 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++) {
@@ -2947,7 +2943,6 @@ 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");
     });
@@ -3039,7 +3034,6 @@ page.open(url, function(status) {
     // use entropy
     page.evaluate(function() {
         $(".use-entropy").prop("checked", true).trigger("change");
-        $(".mnemonic-length").val("raw");
         $(".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");
     });
     // get the mnemonic
@@ -3345,6 +3339,7 @@ page.open(url, function(status) {
     // use entropy
     page.evaluate(function() {
         $(".use-entropy").prop("checked", true).trigger("change");
+        $(".mnemonic-length").val("15");
         $(".entropy").val("1111").trigger("input");
     });
     waitForGenerate(function() {