aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/js/index.js87
-rw-r--r--tests/spec/tests.js49
2 files changed, 128 insertions, 8 deletions
diff --git a/src/js/index.js b/src/js/index.js
index 1b56d6c..371cea9 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -910,7 +910,14 @@
910 indexText = indexText + "'"; 910 indexText = indexText + "'";
911 } 911 }
912 // Ethereum values are different 912 // Ethereum values are different
913 if (networks[DOM.network.val()].name == "ETH - Ethereum") { 913 if ((networks[DOM.network.val()].name == "ETH - Ethereum")
914 || (networks[DOM.network.val()].name == "ETC - Ethereum Classic")
915 || (networks[DOM.network.val()].name == "PIRL - Pirl")
916 || (networks[DOM.network.val()].name == "MIX - MIX")
917 || (networks[DOM.network.val()].name == "MUSIC - Musicoin")
918 || (networks[DOM.network.val()].name == "POA - Poa")
919 || (networks[DOM.network.val()].name == "EXP - Expanse")
920 || (networks[DOM.network.val()].name == "CLO - Callisto")) {
914 var privKeyBuffer = keyPair.d.toBuffer(32); 921 var privKeyBuffer = keyPair.d.toBuffer(32);
915 privkey = privKeyBuffer.toString('hex'); 922 privkey = privKeyBuffer.toString('hex');
916 var addressBuffer = ethUtil.privateToAddress(privKeyBuffer); 923 var addressBuffer = ethUtil.privateToAddress(privKeyBuffer);
@@ -1773,6 +1780,14 @@
1773 }, 1780 },
1774 }, 1781 },
1775 { 1782 {
1783 name: "CLO - Callisto",
1784 segwitAvailable: false,
1785 onSelect: function() {
1786 network = bitcoinjs.bitcoin.networks.bitcoin;
1787 setHdCoin(820);
1788 },
1789 },
1790 {
1776 name: "CLUB - Clubcoin", 1791 name: "CLUB - Clubcoin",
1777 onSelect: function() { 1792 onSelect: function() {
1778 network = bitcoinjs.bitcoin.networks.clubcoin; 1793 network = bitcoinjs.bitcoin.networks.clubcoin;
@@ -1892,6 +1907,14 @@
1892 }, 1907 },
1893 }, 1908 },
1894 { 1909 {
1910 name: "ETC - Ethereum Classic",
1911 segwitAvailable: false,
1912 onSelect: function() {
1913 network = bitcoinjs.bitcoin.networks.bitcoin;
1914 setHdCoin(61);
1915 },
1916 },
1917 {
1895 name: "ETH - Ethereum", 1918 name: "ETH - Ethereum",
1896 onSelect: function() { 1919 onSelect: function() {
1897 network = bitcoinjs.bitcoin.networks.bitcoin; 1920 network = bitcoinjs.bitcoin.networks.bitcoin;
@@ -1906,6 +1929,14 @@
1906 }, 1929 },
1907 }, 1930 },
1908 { 1931 {
1932 name: "EXP - Expanse",
1933 segwitAvailable: false,
1934 onSelect: function() {
1935 network = bitcoinjs.bitcoin.networks.bitcoin;
1936 setHdCoin(40);
1937 },
1938 },
1939 {
1909 name: "FJC - Fujicoin", 1940 name: "FJC - Fujicoin",
1910 onSelect: function() { 1941 onSelect: function() {
1911 network = bitcoinjs.bitcoin.networks.fujicoin; 1942 network = bitcoinjs.bitcoin.networks.fujicoin;
@@ -2063,6 +2094,14 @@
2063 }, 2094 },
2064 }, 2095 },
2065 { 2096 {
2097 name: "MIX - MIX",
2098 segwitAvailable: false,
2099 onSelect: function() {
2100 network = bitcoinjs.bitcoin.networks.bitcoin;
2101 setHdCoin(76);
2102 },
2103 },
2104 {
2066 name: "MNX - Minexcoin", 2105 name: "MNX - Minexcoin",
2067 onSelect: function() { 2106 onSelect: function() {
2068 network = bitcoinjs.bitcoin.networks.minexcoin; 2107 network = bitcoinjs.bitcoin.networks.minexcoin;
@@ -2077,6 +2116,14 @@
2077 }, 2116 },
2078 }, 2117 },
2079 { 2118 {
2119 name: "MUSIC - Musicoin",
2120 segwitAvailable: false,
2121 onSelect: function() {
2122 network = bitcoinjs.bitcoin.networks.bitcoin;
2123 setHdCoin(184);
2124 },
2125 },
2126 {
2080 name: "NAV - Navcoin", 2127 name: "NAV - Navcoin",
2081 onSelect: function() { 2128 onSelect: function() {
2082 network = bitcoinjs.bitcoin.networks.navcoin; 2129 network = bitcoinjs.bitcoin.networks.navcoin;
@@ -2175,6 +2222,14 @@
2175 }, 2222 },
2176 }, 2223 },
2177 { 2224 {
2225 name: "PIRL - Pirl",
2226 segwitAvailable: false,
2227 onSelect: function() {
2228 network = bitcoinjs.bitcoin.networks.bitcoin;
2229 setHdCoin(164);
2230 },
2231 },
2232 {
2178 name: "PIVX - PIVX", 2233 name: "PIVX - PIVX",
2179 onSelect: function() { 2234 onSelect: function() {
2180 network = bitcoinjs.bitcoin.networks.pivx; 2235 network = bitcoinjs.bitcoin.networks.pivx;
@@ -2189,6 +2244,14 @@
2189 }, 2244 },
2190 }, 2245 },
2191 { 2246 {
2247 name: "POA - Poa",
2248 segwitAvailable: false,
2249 onSelect: function() {
2250 network = bitcoinjs.bitcoin.networks.bitcoin;
2251 setHdCoin(178);
2252 },
2253 },
2254 {
2192 name: "POSW - POSWcoin", 2255 name: "POSW - POSWcoin",
2193 onSelect: function() { 2256 onSelect: function() {
2194 network = bitcoinjs.bitcoin.networks.poswcoin; 2257 network = bitcoinjs.bitcoin.networks.poswcoin;
@@ -2413,6 +2476,14 @@
2413 }, 2476 },
2414 }, 2477 },
2415 { 2478 {
2479 name: "XUEZ - Xuez",
2480 segwitAvailable: false,
2481 onSelect: function() {
2482 network = bitcoinjs.bitcoin.networks.xuez;
2483 setHdCoin(225);
2484 },
2485 },
2486 {
2416 name: "XWC - Whitecoin", 2487 name: "XWC - Whitecoin",
2417 onSelect: function() { 2488 onSelect: function() {
2418 network = bitcoinjs.bitcoin.networks.whitecoin; 2489 network = bitcoinjs.bitcoin.networks.whitecoin;
@@ -2441,13 +2512,6 @@
2441 }, 2512 },
2442 }, 2513 },
2443 { 2514 {
2444 name: "XUEZ - Xuez",
2445 onSelect: function() {
2446 network = bitcoinjs.bitcoin.networks.xuez;
2447 setHdCoin(225);
2448 },
2449 },
2450 {
2451 name: "ZEN - Zencash", 2515 name: "ZEN - Zencash",
2452 onSelect: function() { 2516 onSelect: function() {
2453 network = bitcoinjs.bitcoin.networks.zencash; 2517 network = bitcoinjs.bitcoin.networks.zencash;
@@ -2477,6 +2541,13 @@
2477 DOM.bip32path.val("m/0'/0"); 2541 DOM.bip32path.val("m/0'/0");
2478 DOM.hardenedAddresses.prop('checked', false); 2542 DOM.hardenedAddresses.prop('checked', false);
2479 }, 2543 },
2544 },
2545 {
2546 name: "Coinomi, Ledger",
2547 onSelect: function() {
2548 DOM.bip32path.val("m/44'/"+DOM.bip44coin.val()+"'/0'");
2549 DOM.hardenedAddresses.prop('checked', false);
2550 },
2480 } 2551 }
2481 ] 2552 ]
2482 2553
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index b81294b..0ffc73b 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -1208,6 +1208,55 @@ it('Allows selection of Energi', function(done) {
1208 }; 1208 };
1209 testNetwork(done, params); 1209 testNetwork(done, params);
1210}); 1210});
1211it('Allows selection of Ethereum Classic', function(done) {
1212 var params = {
1213 selectText: "ETC - Ethereum Classic",
1214 firstAddress: "0x3c05e5556693808367afB62eF3b63e35d6eD249A",
1215 };
1216 testNetwork(done, params);
1217});
1218it('Allows selection of Pirl', function(done) {
1219 var params = {
1220 selectText: "PIRL - Pirl",
1221 firstAddress: "0xe77FC0723dA122B5025CA79193c28563eB47e776",
1222 };
1223 testNetwork(done, params);
1224});
1225it('Allows selection of MIX', function(done) {
1226 var params = {
1227 selectText: "MIX - MIX",
1228 firstAddress: "0x98BC5e63aeb6A4e82d72850d20710F07E29A29F1",
1229 };
1230 testNetwork(done, params);
1231});
1232it('Allows selection of Musicoin', function(done) {
1233 var params = {
1234 selectText: "MUSIC - Musicoin",
1235 firstAddress: "0xDc060e4A0b0313ea83Cf6B3A39B9db2D29004897",
1236 };
1237 testNetwork(done, params);
1238});
1239it('Allows selection of Poa', function(done) {
1240 var params = {
1241 selectText: "POA - Poa",
1242 firstAddress: "0x53aF28d754e106210C3d0467Dd581eaf7e3C5e60",
1243 };
1244 testNetwork(done, params);
1245});
1246it('Allows selection of Expanse', function(done) {
1247 var params = {
1248 selectText: "EXP - Expanse",
1249 firstAddress: "0xf57FeAbf26582b6E3E666559d3B1Cc6fB2b2c5F6",
1250 };
1251 testNetwork(done, params);
1252});
1253it('Allows selection of Callisto', function(done) {
1254 var params = {
1255 selectText: "CLO - Callisto",
1256 firstAddress: "0x4f9364F7420B317266C51Dc8eB979717D4dE3f4E",
1257 };
1258 testNetwork(done, params);
1259});
1211 1260
1212 1261
1213// BIP39 seed is set from phrase 1262// BIP39 seed is set from phrase