aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/casinocoin-util.js10
-rw-r--r--src/js/index.js12
2 files changed, 22 insertions, 0 deletions
diff --git a/src/js/casinocoin-util.js b/src/js/casinocoin-util.js
new file mode 100644
index 0000000..f76e989
--- /dev/null
+++ b/src/js/casinocoin-util.js
@@ -0,0 +1,10 @@
1function convertCasinoCoinAdrr(address) {
2 return window.basex('cpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2brdeCg65jkm8oFqi1tuvAxyz').encode(
3 window.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(address)
4 )
5 }
6
7function convertCasinoCoinPriv(priv) {
8 return window.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(priv).toString("hex").slice(2,66)
9}
10
diff --git a/src/js/index.js b/src/js/index.js
index 3afa598..4fac6f1 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -959,6 +959,11 @@
959 privkey = convertRipplePriv(privkey); 959 privkey = convertRipplePriv(privkey);
960 address = convertRippleAdrr(address); 960 address = convertRippleAdrr(address);
961 } 961 }
962 // CasinoCoin values are different
963 if (networks[DOM.network.val()].name == "CSC - CasinoCoin") {
964 privkey = convertCasinoCoinPriv(privkey);
965 address = convertCasinoCoinAdrr(address);
966 }
962 // Bitcoin Cash address format may vary 967 // Bitcoin Cash address format may vary
963 if (networks[DOM.network.val()].name == "BCH - Bitcoin Cash") { 968 if (networks[DOM.network.val()].name == "BCH - Bitcoin Cash") {
964 var bchAddrType = DOM.bitcoinCashAddressType.filter(":checked").val(); 969 var bchAddrType = DOM.bitcoinCashAddressType.filter(":checked").val();
@@ -1931,6 +1936,13 @@
1931 }, 1936 },
1932 }, 1937 },
1933 { 1938 {
1939 name: "CSC - CasinoCoin",
1940 onSelect: function() {
1941 network = bitcoinjs.bitcoin.networks.bitcoin;
1942 setHdCoin(359);
1943 },
1944 },
1945 {
1934 name: "DASH - Dash", 1946 name: "DASH - Dash",
1935 onSelect: function() { 1947 onSelect: function() {
1936 network = bitcoinjs.bitcoin.networks.dash; 1948 network = bitcoinjs.bitcoin.networks.dash;