aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index 1db6820..3518aa0 100644
--- a/tests.js
+++ b/tests.js
@@ -1733,6 +1733,34 @@ page.open(url, function(status) {
1733 1733
1734// Github Issue 26: When using a Root key derrived altcoins are incorrect 1734// Github Issue 26: When using a Root key derrived altcoins are incorrect
1735// https://github.com/dcpos/bip39/issues/26 1735// https://github.com/dcpos/bip39/issues/26
1736function() {
1737page.open(url, function(status) {
1738 // 1) 2) and 3) set the root key
1739 page.evaluate(function() {
1740 $(".root-key").val("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi").trigger("input");
1741 });
1742 waitForGenerate(function() {
1743 // 4) switch from bitcoin to viacoin
1744 page.evaluate(function() {
1745 $(".network").val("6").trigger("change");
1746 });
1747 waitForGenerate(function() {
1748 // 5) ensure the derived address is correct
1749 var expected = "Vq9Eq4N5SQnjqZvxtxzo7hZPW5XnyJsmXT";
1750 var actual = page.evaluate(function() {
1751 return $(".address:first").text();
1752 });
1753 if (actual != expected) {
1754 console.log("Github Issue 26: address is incorrect when changing networks and using root-key to derive");
1755 console.log("Expected: " + expected);
1756 console.log("Actual: " + actual);
1757 fail();
1758 }
1759 next();
1760 });
1761 });
1762});
1763},
1736 1764
1737]; 1765];
1738 1766