]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Test coin selection is used in derivation path
authorIan Coleman <coleman.ian@gmail.com>
Wed, 5 Oct 2016 01:35:40 +0000 (12:35 +1100)
committerIan Coleman <coleman.ian@gmail.com>
Wed, 5 Oct 2016 01:35:40 +0000 (12:35 +1100)
tests.js

index 557eaa7f353a2912415e2a83ce32788ae7ba3ce8..1db6820796dbfcbb8e70ccc4edf7376c61e20fcd 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -1702,6 +1702,34 @@ page.open(url, function(status) {
 
 // Github Issue 23 Part 2: Coin selection in derivation path
 // https://github.com/dcpos/bip39/issues/23#issuecomment-238011920
+function() {
+page.open(url, function(status) {
+    // set the phrase
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon ability").trigger("input");
+    });
+    waitForGenerate(function() {
+        // switch from bitcoin to clam
+        page.evaluate(function() {
+            $(".network").val("9").trigger("change");
+        });
+        waitForGenerate(function() {
+            // check derivation path is displayed correctly
+            var expected = "m/44'/23'/0'/0/0";
+            var actual = page.evaluate(function() {
+                return $(".index:first").text();
+            });
+            if (actual != expected) {
+                console.log("Github Issue 23 Part 2: Coin in BIP44 derivation path is incorrect");
+                console.log("Expected: " + expected);
+                console.log("Actual: " + actual);
+                fail();
+            }
+            next();
+        });
+    });
+});
+},
 
 // Github Issue 26: When using a Root key derrived altcoins are incorrect
 // https://github.com/dcpos/bip39/issues/26