diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2017-08-06 07:58:58 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2017-08-07 18:54:12 +1000 |
commit | daab55dc613a1eef22463356eba1a742cb814cb2 (patch) | |
tree | 508caa1ac338c71b9fa9b22c3e6385c036aeda85 /tests.js | |
parent | 7b742f87d3b17fa73e8fcdfda19bc8d08405f7cc (diff) | |
download | BIP39-daab55dc613a1eef22463356eba1a742cb814cb2.tar.gz BIP39-daab55dc613a1eef22463356eba1a742cb814cb2.tar.zst BIP39-daab55dc613a1eef22463356eba1a742cb814cb2.zip |
Add BCH - Bitcoin Cash network
Diffstat (limited to 'tests.js')
-rw-r--r-- | tests.js | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -872,6 +872,36 @@ page.open(url, function(status) { | |||
872 | }); | 872 | }); |
873 | }, | 873 | }, |
874 | 874 | ||
875 | // Network can be set to bitcoin cash | ||
876 | function() { | ||
877 | page.open(url, function(status) { | ||
878 | // set the phrase and coin | ||
879 | var expected = "1JKvb6wKtsjNoCRxpZ4DGrbniML7z5U16A"; | ||
880 | page.evaluate(function() { | ||
881 | $(".phrase").val("abandon abandon ability"); | ||
882 | $(".phrase").trigger("input"); | ||
883 | $(".network option[selected]").removeAttr("selected"); | ||
884 | $(".network option").filter(function() { | ||
885 | return $(this).html() == "BCH - Bitcoin Cash"; | ||
886 | }).prop("selected", true); | ||
887 | $(".network").trigger("change"); | ||
888 | }); | ||
889 | // check the address is generated correctly | ||
890 | waitForGenerate(function() { | ||
891 | var actual = page.evaluate(function() { | ||
892 | return $(".address:first").text(); | ||
893 | }); | ||
894 | if (actual != expected) { | ||
895 | console.log("Bitcoin Cash address is incorrect"); | ||
896 | console.log("Expected: " + expected); | ||
897 | console.log("Actual: " + actual); | ||
898 | fail(); | ||
899 | } | ||
900 | next(); | ||
901 | }); | ||
902 | }); | ||
903 | }, | ||
904 | |||
875 | // BIP39 seed is set from phrase | 905 | // BIP39 seed is set from phrase |
876 | function() { | 906 | function() { |
877 | page.open(url, function(status) { | 907 | page.open(url, function(status) { |