aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-09-14 16:46:20 +1000
committerIan Coleman <coleman.ian@gmail.com>2016-09-14 16:46:20 +1000
commit61ed16a9cefec8a9a9b7d7c41141e6ef10c3e3e1 (patch)
treeb252226a40f7f423e2f233f9b8663689e857368e /tests.js
parentaa51da11523b390878d0baa4b66c04e2d6a3c305 (diff)
downloadBIP39-61ed16a9cefec8a9a9b7d7c41141e6ef10c3e3e1.tar.gz
BIP39-61ed16a9cefec8a9a9b7d7c41141e6ef10c3e3e1.tar.zst
BIP39-61ed16a9cefec8a9a9b7d7c41141e6ef10c3e3e1.zip
Test BIP32 root key being set by user
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index 2800e6c..cef6e13 100644
--- a/tests.js
+++ b/tests.js
@@ -1291,6 +1291,28 @@ page.open(url, function(status) {
1291}, 1291},
1292 1292
1293// BIP32 root key can be set by the user 1293// BIP32 root key can be set by the user
1294function() {
1295page.open(url, function(status) {
1296 var expected = "1Di3Vp7tBWtyQaDABLAjfWtF6V7hYKJtug";
1297 // set the root key
1298 page.evaluate(function() {
1299 $(".root-key").val("xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi").trigger("input");
1300 });
1301 waitForGenerate(function() {
1302 var actual = page.evaluate(function() {
1303 return $(".address:first").text();
1304 });
1305 if (actual != expected) {
1306 console.log("Passphrase results in wrong address");
1307 console.log("Expected: " + expected);
1308 console.log("Actual: " + actual);
1309 fail();
1310 }
1311 next();
1312 });
1313});
1314},
1315
1294// Setting BIP32 root key clears the existing phrase, passphrase and seed 1316// Setting BIP32 root key clears the existing phrase, passphrase and seed
1295// Clearing of phrase, passphrase and seed can be cancelled by user 1317// Clearing of phrase, passphrase and seed can be cancelled by user
1296// Custom BIP32 root key is used when changing the derivation path 1318// Custom BIP32 root key is used when changing the derivation path