aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index 7c67b02..e5a40ae 100644
--- a/tests.js
+++ b/tests.js
@@ -1372,7 +1372,36 @@ page.open(url, function(status) {
1372 next(); 1372 next();
1373}); 1373});
1374}, 1374},
1375
1375// Custom BIP32 root key is used when changing the derivation path 1376// Custom BIP32 root key is used when changing the derivation path
1377function() {
1378page.open(url, function(status) {
1379 var expected = "1Nq2Wmu726XHCuGhctEtGmhxo3wzk5wZ1H";
1380 // set the root key
1381 page.evaluate(function() {
1382 $(".root-key").val("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi").trigger("input");
1383 });
1384 waitForGenerate(function() {
1385 // change the derivation path
1386 page.evaluate(function() {
1387 $("#account").val("1").trigger("input");
1388 });
1389 // check the bip32 root key is used for derivation, not the blank phrase
1390 waitForGenerate(function() {
1391 var actual = page.evaluate(function() {
1392 return $(".address:first").text();
1393 });
1394 if (actual != expected) {
1395 console.log("Changing the derivation path does not use BIP32 root key");
1396 console.log("Expected: " + expected);
1397 console.log("Actual: " + actual);
1398 fail();
1399 }
1400 next();
1401 });
1402 });
1403});
1404},
1376 1405
1377// Incorrect mnemonic shows error 1406// Incorrect mnemonic shows error
1378// Incorrect word shows suggested replacement 1407// Incorrect word shows suggested replacement