diff options
author | Ian Coleman <ian@iancoleman.io> | 2018-01-16 09:01:10 +1100 |
---|---|---|
committer | Ian Coleman <ian@iancoleman.io> | 2018-01-16 10:33:08 +1100 |
commit | 78db37f6636f195753a59a61901f850880177c50 (patch) | |
tree | 521641c5ad614c32b5ff263e4d81a5023c6e5a6a /tests | |
parent | 28e1cd455c7c66d658f2ed4c84b2345c36d5a9a1 (diff) | |
download | BIP39-78db37f6636f195753a59a61901f850880177c50.tar.gz BIP39-78db37f6636f195753a59a61901f850880177c50.tar.zst BIP39-78db37f6636f195753a59a61901f850880177c50.zip |
LeftPad ethereum private keys with zeros if needed
Diffstat (limited to 'tests')
-rw-r--r-- | tests/spec/tests.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js index a4863b0..9a1e543 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js | |||
@@ -2850,4 +2850,29 @@ it('Can display the table as csv', function(done) { | |||
2850 | }); | 2850 | }); |
2851 | }); | 2851 | }); |
2852 | 2852 | ||
2853 | it('LeftPads ethereum keys that are less than 32 bytes', function(done) { | ||
2854 | // see https://github.com/iancoleman/bip39/issues/155 | ||
2855 | selectNetwork("ETH - Ethereum"); | ||
2856 | driver.findElement(By.css('#bip32-tab a')) | ||
2857 | .click() | ||
2858 | driver.findElement(By.css('#bip32-path')) | ||
2859 | .clear(); | ||
2860 | driver.findElement(By.css('#bip32-path')) | ||
2861 | .sendKeys("m/44'/60'/0'"); | ||
2862 | driver.findElement(By.css('.phrase')) | ||
2863 | .sendKeys('scout sort custom elite radar rare vivid thing trophy gesture cover snake change narrow kite list nation sustain buffalo erode open balance system young'); | ||
2864 | driver.sleep(generateDelay).then(function() { | ||
2865 | driver.findElement(By.css(".address")) | ||
2866 | .getText() | ||
2867 | .then(function(address) { | ||
2868 | expect(address).toBe("0x8943E785B4a5714FC87a3aFAad1eB1FeB602B118"); | ||
2869 | done(); | ||
2870 | }); | ||
2871 | //getFirstAddress(function(address) { | ||
2872 | // expect(address).toBe("0x8943E785B4a5714FC87a3aFAad1eB1FeB602B118"); | ||
2873 | // done(); | ||
2874 | //}); | ||
2875 | }); | ||
2876 | }); | ||
2877 | |||
2853 | }); | 2878 | }); |