|
|
@ -64,374 +64,7 @@ function EdexfillTxHistory(coin) { |
|
|
|
} |
|
|
|
|
|
|
|
function refreshEDEXCoinWalletList() { |
|
|
|
var walletDivContent = '', |
|
|
|
AddColumnDiv = 0; |
|
|
|
|
|
|
|
$.each([ |
|
|
|
'native', |
|
|
|
'basilisk', |
|
|
|
'full' |
|
|
|
],function( index, value ) { |
|
|
|
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|
|
|
ajax_data = { |
|
|
|
'userpass': tmpIguanaRPCAuth, |
|
|
|
'agent': 'InstantDEX', |
|
|
|
'method': 'allcoins' |
|
|
|
}; |
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
type: 'POST', |
|
|
|
data: JSON.stringify(ajax_data), |
|
|
|
url: 'http://127.0.0.1:' + config.iguanaPort, |
|
|
|
success: function(data, textStatus, jqXHR) { |
|
|
|
var AllcoinsDataOutput = JSON.parse(data); |
|
|
|
|
|
|
|
$.each(AllcoinsDataOutput[value], function(index) { |
|
|
|
var coinlogo = '', |
|
|
|
coinname = '', |
|
|
|
modecode = '', |
|
|
|
modetip = '', |
|
|
|
modecolor = ''; |
|
|
|
|
|
|
|
switch (value) { |
|
|
|
case 'native': |
|
|
|
modecode = 'Native'; |
|
|
|
modetip = 'Native'; |
|
|
|
modecolor = 'primary'; |
|
|
|
break; |
|
|
|
case 'basilisk': |
|
|
|
modecode = 'Basilisk'; |
|
|
|
modetip = 'Basilisk'; |
|
|
|
modecolor = 'info'; |
|
|
|
break; |
|
|
|
case 'full': |
|
|
|
modecode = 'Full'; |
|
|
|
modetip = 'Full'; |
|
|
|
modecolor = 'success'; |
|
|
|
break; |
|
|
|
case 'virtual': |
|
|
|
modecode = 'Virtual'; |
|
|
|
modetip = 'Virtual'; |
|
|
|
modecolor = 'danger'; |
|
|
|
break; |
|
|
|
case 'notarychains': |
|
|
|
modecode = 'Notarychains'; |
|
|
|
modetip = 'Notarychains'; |
|
|
|
modecolor = 'dark'; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
switch (AllcoinsDataOutput[value][index]) { |
|
|
|
case 'BTC': |
|
|
|
coinlogo = 'bitcoin'; |
|
|
|
coinname = 'Bitcoin'; |
|
|
|
break; |
|
|
|
case 'BTCD': |
|
|
|
coinlogo = 'bitcoindark'; |
|
|
|
coinname = 'BitcoinDark'; |
|
|
|
break; |
|
|
|
case 'LTC': |
|
|
|
coinlogo = 'litecoin'; |
|
|
|
coinname = 'Litecoin'; |
|
|
|
break; |
|
|
|
case 'VPN': |
|
|
|
coinlogo = 'vpncoin'; |
|
|
|
coinname = 'VPNcoin'; |
|
|
|
break; |
|
|
|
case 'SYS': |
|
|
|
coinlogo = 'syscoin'; |
|
|
|
coinname = 'Syscoin'; |
|
|
|
break; |
|
|
|
case 'ZEC': |
|
|
|
coinlogo = 'zcash'; |
|
|
|
coinname = 'Zcash'; |
|
|
|
break; |
|
|
|
case 'NMC': |
|
|
|
coinlogo = 'namecoin'; |
|
|
|
coinname = 'Namecoin'; |
|
|
|
break; |
|
|
|
case 'DEX': |
|
|
|
coinlogo = 'dex'; |
|
|
|
coinname = 'DEX'; |
|
|
|
break; |
|
|
|
case 'DOGE': |
|
|
|
coinlogo = 'dogecoin'; |
|
|
|
coinname = 'Dogecoin'; |
|
|
|
break; |
|
|
|
case 'DGB': |
|
|
|
coinlogo = 'digibyte'; |
|
|
|
coinname = 'Digibyte'; |
|
|
|
break; |
|
|
|
case 'MZC': |
|
|
|
coinlogo = 'mazacoin'; |
|
|
|
coinname = 'Mazacoin'; |
|
|
|
break; |
|
|
|
case 'UNO': |
|
|
|
coinlogo = 'unobtanium'; |
|
|
|
coinname = 'Unobtanium'; |
|
|
|
break; |
|
|
|
case 'ZET': |
|
|
|
coinlogo = 'zetacoin'; |
|
|
|
coinname = 'Zetacoin'; |
|
|
|
break; |
|
|
|
case 'KMD': |
|
|
|
coinlogo = 'komodo'; |
|
|
|
coinname = 'Komodo'; |
|
|
|
break; |
|
|
|
case 'BTM': |
|
|
|
coinlogo = 'bitmark'; |
|
|
|
coinname = 'Bitmark'; |
|
|
|
break; |
|
|
|
case 'CARB': |
|
|
|
coinlogo = 'carboncoin'; |
|
|
|
coinname = 'Carboncoin'; |
|
|
|
break; |
|
|
|
case 'ANC': |
|
|
|
coinlogo = 'anoncoin'; |
|
|
|
coinname = 'AnonCoin'; |
|
|
|
break; |
|
|
|
case 'FRK': |
|
|
|
coinlogo = 'franko'; |
|
|
|
coinname = 'Franko'; |
|
|
|
break; |
|
|
|
case 'SUPERNET': |
|
|
|
coinlogo = 'SUPERNET'; |
|
|
|
coinname = 'SUPERNET'; |
|
|
|
break; |
|
|
|
case 'REVS': |
|
|
|
coinlogo = 'REVS'; |
|
|
|
coinname = 'REVS'; |
|
|
|
break; |
|
|
|
case 'WIRELESS': |
|
|
|
coinlogo = 'WIRELESS'; |
|
|
|
coinname = 'WIRELESS'; |
|
|
|
break; |
|
|
|
case 'DEX': |
|
|
|
coinlogo = 'DEX'; |
|
|
|
coinname = 'DEX'; |
|
|
|
break; |
|
|
|
case 'PANGEA': |
|
|
|
coinlogo = 'PANGEA'; |
|
|
|
coinname = 'PANGEA'; |
|
|
|
break; |
|
|
|
case 'JUMBLR': |
|
|
|
coinlogo = 'JUMBLR'; |
|
|
|
coinname = 'JUMBLR'; |
|
|
|
break; |
|
|
|
case 'BET': |
|
|
|
coinlogo = 'BET'; |
|
|
|
coinname = 'BET'; |
|
|
|
break; |
|
|
|
case 'CRYPTO': |
|
|
|
coinlogo = 'CRYPTO'; |
|
|
|
coinname = 'CRYPTO'; |
|
|
|
break; |
|
|
|
case 'HODL': |
|
|
|
coinlogo = 'HODL'; |
|
|
|
coinname = 'HODL'; |
|
|
|
break; |
|
|
|
case 'SHARK': |
|
|
|
coinlogo = 'SHARK'; |
|
|
|
coinname = 'SHARK'; |
|
|
|
break; |
|
|
|
case 'BOTS': |
|
|
|
coinlogo = 'BOTS'; |
|
|
|
coinname = 'BOTS'; |
|
|
|
break; |
|
|
|
case 'MGW': |
|
|
|
coinlogo = 'MGW'; |
|
|
|
coinname = 'MGW'; |
|
|
|
break; |
|
|
|
case 'MVP': |
|
|
|
coinlogo = 'MVP'; |
|
|
|
coinname = 'MVP'; |
|
|
|
break; |
|
|
|
case 'KV': |
|
|
|
coinlogo = 'KV'; |
|
|
|
coinname = 'KV'; |
|
|
|
break; |
|
|
|
case 'CEAL': |
|
|
|
coinlogo = 'CEAL'; |
|
|
|
coinname = 'CEAL'; |
|
|
|
break; |
|
|
|
case 'MESH': |
|
|
|
coinlogo = 'MESH'; |
|
|
|
coinname = 'MESH'; |
|
|
|
break; |
|
|
|
case 'USD': |
|
|
|
coinlogo = 'USD'; |
|
|
|
coinname = 'USD'; |
|
|
|
break; |
|
|
|
case 'RON': |
|
|
|
coinlogo = 'RON'; |
|
|
|
coinname = 'RON'; |
|
|
|
break; |
|
|
|
case 'EUR': |
|
|
|
coinlogo = 'EUR'; |
|
|
|
coinname = 'Euro'; |
|
|
|
break; |
|
|
|
case 'JPY': |
|
|
|
coinlogo = 'JPY'; |
|
|
|
coinname = 'Japanese Yen'; |
|
|
|
break; |
|
|
|
case 'GBP': |
|
|
|
coinlogo = 'GBP'; |
|
|
|
coinname = 'British Pound'; |
|
|
|
break; |
|
|
|
case 'AUD': |
|
|
|
coinlogo = 'AUD'; |
|
|
|
coinname = 'Australian Dollar'; |
|
|
|
break; |
|
|
|
case 'CAD': |
|
|
|
coinlogo = 'CAD'; |
|
|
|
coinname = 'Canadian Dollar'; |
|
|
|
break; |
|
|
|
case 'CHF': |
|
|
|
coinlogo = 'CHF'; |
|
|
|
coinname = 'Swiss Franc'; |
|
|
|
break; |
|
|
|
case 'NZD': |
|
|
|
coinlogo = 'NZD'; |
|
|
|
coinname = 'New Zealand Dollar'; |
|
|
|
break; |
|
|
|
case 'CNY': |
|
|
|
coinlogo = 'CNY'; |
|
|
|
coinname = 'Chinese Yuan'; |
|
|
|
break; |
|
|
|
case 'RUB': |
|
|
|
coinlogo = 'RUB'; |
|
|
|
coinname = 'Russian Ruble'; |
|
|
|
break; |
|
|
|
case 'MXN': |
|
|
|
coinlogo = 'MXN'; |
|
|
|
coinname = 'Mexican peso'; |
|
|
|
break; |
|
|
|
case 'BRL': |
|
|
|
coinlogo = 'BRL'; |
|
|
|
coinname = 'Brazilian Real'; |
|
|
|
break; |
|
|
|
case 'INR': |
|
|
|
coinlogo = 'INR'; |
|
|
|
coinname = 'Indian Rupee'; |
|
|
|
break; |
|
|
|
case 'HKD': |
|
|
|
coinlogo = 'HKD'; |
|
|
|
coinname = 'Hong Kong Dollar'; |
|
|
|
break; |
|
|
|
case 'TRY': |
|
|
|
coinlogo = 'TRY'; |
|
|
|
coinname = 'Turkish Lira'; |
|
|
|
break; |
|
|
|
case 'ZAR': |
|
|
|
coinlogo = 'ZAR'; |
|
|
|
coinname = 'South African Rand'; |
|
|
|
break; |
|
|
|
case 'PLN': |
|
|
|
coinlogo = 'PLN'; |
|
|
|
coinname = 'Polish Zloty'; |
|
|
|
break; |
|
|
|
case 'NOK': |
|
|
|
coinlogo = 'NOK'; |
|
|
|
coinname = 'Norwegian Krone'; |
|
|
|
break; |
|
|
|
case 'SEK': |
|
|
|
coinlogo = 'SEK'; |
|
|
|
coinname = 'Swedish Krona'; |
|
|
|
break; |
|
|
|
case 'DKK': |
|
|
|
coinlogo = 'DKK'; |
|
|
|
coinname = 'Danish Krone'; |
|
|
|
break; |
|
|
|
case 'CZK': |
|
|
|
coinlogo = 'CZK'; |
|
|
|
coinname = 'Czech Koruna'; |
|
|
|
break; |
|
|
|
case 'HUF': |
|
|
|
coinlogo = 'HUF'; |
|
|
|
coinname = 'Hungarian Forint'; |
|
|
|
break; |
|
|
|
case 'ILS': |
|
|
|
coinlogo = 'ILS'; |
|
|
|
coinname = 'Israeli Shekel'; |
|
|
|
break; |
|
|
|
case 'KRW': |
|
|
|
coinlogo = 'KRW'; |
|
|
|
coinname = 'Korean Won'; |
|
|
|
break; |
|
|
|
case 'MYR': |
|
|
|
coinlogo = 'MYR'; |
|
|
|
coinname = 'Malaysian Ringgit'; |
|
|
|
break; |
|
|
|
case 'PHP': |
|
|
|
coinlogo = 'PHP'; |
|
|
|
coinname = 'Philippine Peso'; |
|
|
|
break; |
|
|
|
case 'SGD': |
|
|
|
coinlogo = 'SGD'; |
|
|
|
coinname = 'Singapore Dollar'; |
|
|
|
break; |
|
|
|
case 'THB': |
|
|
|
coinlogo = 'THB'; |
|
|
|
coinname = 'Thai Baht'; |
|
|
|
break; |
|
|
|
case 'BGN': |
|
|
|
coinlogo = 'BGN'; |
|
|
|
coinname = 'Bulgarian Lev'; |
|
|
|
break; |
|
|
|
case 'IDR': |
|
|
|
coinlogo = 'IDR'; |
|
|
|
coinname = 'Indonesian Rupiah'; |
|
|
|
break; |
|
|
|
case 'HRK': |
|
|
|
coinlogo = 'HRK'; |
|
|
|
coinname = 'Croatian Kuna'; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
walletDivContent += |
|
|
|
'<!-- Wallet Widget ' + AllcoinsDataOutput[value][index] + ' -->' + |
|
|
|
'<div class="list-group-item col-xlg-6 col-lg-12 wallet-widgets-info" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '">' + |
|
|
|
'<div class="widget widget-shadow">' + |
|
|
|
'<div class="widget-content text-center bg-white padding-20">' + |
|
|
|
'<a class="avatar margin-bottom-5 edexcoin-logo" href="javascript:void(0)" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '" data-edexcoinmodecode="' + modecode + '" data-edexcoinname="' + coinname + '" id="edexcoin-logo">' + |
|
|
|
'<img class="img-responsive" src="assets/images/cryptologo/' + coinlogo + '.png" alt="' + coinname + '"/>' + |
|
|
|
'<span class="badge up badge-' + modecolor + '" id="basfull" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '" data-toggle="tooltip" data-placement="top" data-original-title="' + modetip + '">' + modecode + '</span>' + |
|
|
|
'</a>' + |
|
|
|
'<div class="coin-name">' + coinname + '</div>' + |
|
|
|
'</div>' + |
|
|
|
'</div>' + |
|
|
|
'</div>' + |
|
|
|
'<!-- End Wallet Widget ' + AllcoinsDataOutput[value][index] + ' -->'; |
|
|
|
|
|
|
|
$('.wallet-widgets-row').html(walletDivContent); |
|
|
|
//getCoinBalance(AllcoinsDataOutput[value][index]);
|
|
|
|
//getCoinBalance_altfn('KMD');
|
|
|
|
//getCoinBalance('KMD');
|
|
|
|
/*if ( modecode == 'Basilisk' ) { |
|
|
|
$('span[data-edexcoincode="' + AllcoinsDataOutput[value][index] + '"][id="edexcoin-balance"]').parent().hide(); |
|
|
|
//getBasiliskCoinBalance(AllcoinsDataOutput[value][index])
|
|
|
|
}*/ |
|
|
|
|
|
|
|
$('.scrollbar-dynamic').scrollbar(); //Make sure widget-body has scrollbar for transactions history
|
|
|
|
$('[data-toggle="tooltip"]').tooltip(); //Make sure tooltips are working for wallet widgets and anywhere else in wallet.
|
|
|
|
edexCoinBtnAction(); |
|
|
|
}); |
|
|
|
}, |
|
|
|
error: function(xhr, textStatus, error) { |
|
|
|
console.log('failed starting BitcoinDark.'); |
|
|
|
console.log(xhr.statusText); |
|
|
|
if ( xhr.readyState == 0 ) { |
|
|
|
Iguana_ServiceUnavailable(); |
|
|
|
} |
|
|
|
console.log(textStatus); |
|
|
|
console.log(error); |
|
|
|
|
|
|
|
if (xhr.readyState == '0' ) { |
|
|
|
toastr.error(_lang[defaultLang].TOASTR.IGUANA_CONN_ERR, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
Dashboard.handleWalletWidgets(); |
|
|
|
} |
|
|
|
|
|
|
|
function EdexGetTxList(coin) { |
|
|
|