diff options
Diffstat (limited to 'tests.js')
-rw-r--r-- | tests.js | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -4185,6 +4185,37 @@ page.open(url, function(status) { | |||
4185 | }); | 4185 | }); |
4186 | }, | 4186 | }, |
4187 | 4187 | ||
4188 | // Github issue 95 | ||
4189 | // error trying to generate addresses from xpub with hardened derivation | ||
4190 | function() { | ||
4191 | page.open(url, function(status) { | ||
4192 | // set the phrase | ||
4193 | page.evaluate(function() { | ||
4194 | // Use bip32 tab with hardened addresses | ||
4195 | $(".hardened-addresses").prop("checked", true); | ||
4196 | $("#bip32-tab a").click(); | ||
4197 | // set xpub for account 0 of bip44 for 'abandon abandon ability' | ||
4198 | var bip44AccountXpub = "xpub6CzDCPbtLrrn4VpVbyyQLHbdSMpZoHN4iuW64VswCyEpfjM2mJGdaHJ2DyuZwtst96E16VvcERb8BBeJdHSCVmAq9RhtRQg6eAZFrTKCNqf"; | ||
4199 | $("#root-key").val(bip44AccountXpub); | ||
4200 | $("#root-key").trigger("input"); | ||
4201 | }); | ||
4202 | waitForFeedback(function() { | ||
4203 | // check the error message shows | ||
4204 | var expected = "Hardened derivation path is invalid with xpub key"; | ||
4205 | var actual = page.evaluate(function() { | ||
4206 | return $(".feedback").text(); | ||
4207 | }); | ||
4208 | if (actual != expected) { | ||
4209 | console.log("xpub key with hardened addresses does not show feedback"); | ||
4210 | console.log("Expected: " + expected); | ||
4211 | console.log("Actual: " + actual); | ||
4212 | fail(); | ||
4213 | } | ||
4214 | next(); | ||
4215 | }); | ||
4216 | }); | ||
4217 | }, | ||
4218 | |||
4188 | // If you wish to add more tests, do so here... | 4219 | // If you wish to add more tests, do so here... |
4189 | 4220 | ||
4190 | // Here is a blank test template | 4221 | // Here is a blank test template |