aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-08-23 19:33:32 +1000
committerIan Coleman <coleman.ian@gmail.com>2016-08-23 19:33:32 +1000
commit4fd2925d08ab76479610db36c71d9827472dd291 (patch)
treeb62537f8441acb5b9a07e35fcd1189cc04783286
parentfb3726873f9dd6d7319388a1a5e472042098248b (diff)
downloadBIP39-4fd2925d08ab76479610db36c71d9827472dd291.tar.gz
BIP39-4fd2925d08ab76479610db36c71d9827472dd291.tar.zst
BIP39-4fd2925d08ab76479610db36c71d9827472dd291.zip
Test BIP44 extended private key
-rw-r--r--tests.js26
1 files changed, 24 insertions, 2 deletions
diff --git a/tests.js b/tests.js
index bacaec0..099d700 100644
--- a/tests.js
+++ b/tests.js
@@ -564,9 +564,31 @@ page.open(url, function(status) {
564}); 564});
565}, 565},
566 566
567// TODO finish these tests
568
569// BIP44 extended private key is shown 567// BIP44 extended private key is shown
568function() {
569page.open(url, function(status) {
570 // set the phrase
571 var expected = "xprvA2DxxvPZcyRvYgZMGS53nadR32mVDeCyqQYyFhrCVbJNjPoxMeVf7QT5g7mQASbTf9Kp4cryvcXnu2qurjWKcrdsr91jXymdCDNxKgLFKJG";
572 page.evaluate(function() {
573 $(".phrase").val("abandon abandon ability");
574 $(".phrase").trigger("input");
575 });
576 // check the derivation path of the first address
577 waitForGenerate(function() {
578 var actual = page.evaluate(function() {
579 return $(".extended-priv-key").val();
580 });
581 if (actual != expected) {
582 console.log("BIP44 extended private key is incorrect");
583 console.log("Expected: " + expected);
584 console.log("Actual: " + actual);
585 fail();
586 }
587 next();
588 });
589});
590},
591
570// BIP44 extended public key is shown 592// BIP44 extended public key is shown
571// BIP44 purpose field changes address list 593// BIP44 purpose field changes address list
572// BIP44 coin field changes address list 594// BIP44 coin field changes address list