X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=blobdiff_plain;f=tests.js;h=d5a73f6cee83cf1939b08ddfea962184b6952e2d;hp=10d13a324f5dfb6d0aab2aa3068be44f3affc361;hb=c554e6ff5c2c543997841c0fb0a506262843e8df;hpb=32fab2c39507357909438c2be8cd100c6539038f diff --git a/tests.js b/tests.js index 10d13a3..d5a73f6 100644 --- a/tests.js +++ b/tests.js @@ -3086,6 +3086,58 @@ page.open(url, function(status) { }); }, +// BIP44 account extendend private key is shown +// github issue 37 - compatibility with electrum +function() { +page.open(url, function(status) { + // set the phrase + var expected = "xprv9yzrnt4zWVJUr1k2VxSPy9ettKz5PpeDMgaVG7UKedhqnw1tDkxP2UyYNhuNSumk2sLE5ctwKZs9vwjsq3e1vo9egCK6CzP87H2cVYXpfwQ"; + page.evaluate(function() { + $(".phrase").val("abandon abandon ability"); + $(".phrase").trigger("input"); + }); + // check the BIP44 account extended private key + waitForGenerate(function() { + var actual = page.evaluate(function() { + return $(".account-xprv").val(); + }); + if (actual != expected) { + console.log("BIP44 account extended private key is incorrect"); + console.log("Expected: " + expected); + console.log("Actual: " + actual); + fail(); + } + next(); + }); +}); +}, + +// BIP44 account extendend public key is shown +// github issue 37 - compatibility with electrum +function() { +page.open(url, function(status) { + // set the phrase + var expected = "xpub6CzDCPbtLrrn4VpVbyyQLHbdSMpZoHN4iuW64VswCyEpfjM2mJGdaHJ2DyuZwtst96E16VvcERb8BBeJdHSCVmAq9RhtRQg6eAZFrTKCNqf"; + page.evaluate(function() { + $(".phrase").val("abandon abandon ability"); + $(".phrase").trigger("input"); + }); + // check the BIP44 account extended public key + waitForGenerate(function() { + var actual = page.evaluate(function() { + return $(".account-xpub").val(); + }); + if (actual != expected) { + console.log("BIP44 account extended public key is incorrect"); + console.log("Expected: " + expected); + console.log("Actual: " + actual); + fail(); + } + next(); + }); +}); +}, + // If you wish to add more tests, do so here...