aboutsummaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
authorIan Coleman <ian@iancoleman.io>2018-05-29 10:21:21 +1000
committerIan Coleman <ian@iancoleman.io>2018-05-29 11:30:48 +1000
commit6f7fa3539e4f2cf3be19ebfbd4a914bf0992ca88 (patch)
tree22027f6d86f94f5134fb0d831ff355c42761f4b0 /tests/spec
parent7733ac322b60127fa8d845f90e7605625996c9d1 (diff)
downloadBIP39-6f7fa3539e4f2cf3be19ebfbd4a914bf0992ca88.tar.gz
BIP39-6f7fa3539e4f2cf3be19ebfbd4a914bf0992ca88.tar.zst
BIP39-6f7fa3539e4f2cf3be19ebfbd4a914bf0992ca88.zip
Parse extended root key regardless of prefix
Diffstat (limited to 'tests/spec')
-rw-r--r--tests/spec/tests.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 5ddd686..b90906b 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -3681,4 +3681,23 @@ it('Shows litecoin BIP49 addresses', function(done) {
3681 }); 3681 });
3682}); 3682});
3683 3683
3684it('Can use root keys to generate segwit table rows', function(done) {
3685 // segwit uses ypub / zpub instead of xpub but the root key should still
3686 // be valid regardless of the encoding used to import that key.
3687 // Maybe this breaks the reason for the different extended key prefixes, but
3688 // since the parsed root key is used behind the scenes anyhow this should be
3689 // allowed.
3690 driver.findElement(By.css('#root-key'))
3691 .sendKeys('xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi');
3692 driver.findElement(By.css('#bip49-tab a'))
3693 .click()
3694 // bip49 addresses are shown
3695 driver.sleep(generateDelay).then(function() {
3696 getFirstAddress(function(address) {
3697 expect(address).toBe("3QG2Y9AA4xZ846gKHZqNf7mvVKbLqMKxr2");
3698 done();
3699 });
3700 });
3701});
3702
3684}); 3703});