diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2016-08-23 19:33:32 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2016-08-23 19:33:32 +1000 |
commit | 4fd2925d08ab76479610db36c71d9827472dd291 (patch) | |
tree | b62537f8441acb5b9a07e35fcd1189cc04783286 | |
parent | fb3726873f9dd6d7319388a1a5e472042098248b (diff) | |
download | BIP39-4fd2925d08ab76479610db36c71d9827472dd291.tar.gz BIP39-4fd2925d08ab76479610db36c71d9827472dd291.tar.zst BIP39-4fd2925d08ab76479610db36c71d9827472dd291.zip |
Test BIP44 extended private key
-rw-r--r-- | tests.js | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -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 |
568 | function() { | ||
569 | page.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 |