pbca26
8 years ago
53 changed files with 0 additions and 13840 deletions
@ -1,349 +0,0 @@ |
|||
var AtomicExplorer = function() { |
|||
toastr.options = toastrConfig; |
|||
|
|||
var handleExplorer = function() { |
|||
$('#atomic_explorer_getcoinpeers_btn').click(function() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
console.log('button pushed in atomic explorer'); |
|||
|
|||
var atomic_explorer_select_coin_val = $('select[id=\'atomic_explorer_select_coin_options\']').val(), |
|||
atomic_explorer_select_command_val = $('select[id=\'atomic_explorer_select_command_options\']').val(), |
|||
atomic_explorer_input_data_val = $('#atomic_explorer_input_data').val(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ExplorerInputData; |
|||
|
|||
console.log(atomic_explorer_select_coin_val); |
|||
console.log(atomic_explorer_select_command_val); |
|||
console.log(atomic_explorer_input_data_val); |
|||
|
|||
switch (atomic_explorer_select_command_val) { |
|||
case 'history': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'timeout': 20000, |
|||
'agent': 'basilisk', |
|||
'method': 'history', |
|||
'vals': { |
|||
'coin': atomic_explorer_select_coin_val, |
|||
'addresses': [ atomic_explorer_input_data_val ] |
|||
} |
|||
}; |
|||
break; |
|||
case 'getbalance': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': atomic_explorer_select_coin_val, |
|||
'method': 'getbalance', |
|||
'params': [ atomic_explorer_input_data_val ] |
|||
}; |
|||
break; |
|||
case 'listunspent': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': atomic_explorer_select_coin_val, |
|||
'method': 'listunspent', |
|||
'params': [ |
|||
1, |
|||
9999999, |
|||
[ atomic_explorer_input_data_val ] |
|||
] |
|||
}; |
|||
break; |
|||
case 'txid': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': atomic_explorer_select_coin_val, |
|||
'method': 'getrawtransaction', |
|||
'params': [ atomic_explorer_input_data_val ] |
|||
}; |
|||
break; |
|||
case 'blockash': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': atomic_explorer_select_coin_val, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getblockhash', |
|||
'height': atomic_explorer_input_data_val |
|||
}; |
|||
break; |
|||
case 'chaintip': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': atomic_explorer_select_coin_val, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getbestblockhash' |
|||
}; |
|||
break; |
|||
case 'activehandle': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'activehandle' |
|||
}; |
|||
break; |
|||
case 'gettransaction': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': atomic_explorer_select_coin_val, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'gettransaction', |
|||
'txid': atomic_explorer_input_data_val |
|||
}; |
|||
break; |
|||
case 'dex_getinfo': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getinfo', |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_getnotaries': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getnotaries', |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_alladdresses': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'alladdresses', |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_importaddress': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'importaddress', |
|||
'address': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_checkaddress': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'checkaddress', |
|||
'ddress': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_validateaddress': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'validateaddress', |
|||
'address': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_getbestblockhash': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getbestblockhash', |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_listtransactions': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listtransactions', |
|||
'address': atomic_explorer_input_data_val, |
|||
'count': 100, |
|||
'skip': 0, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_listtransactions2': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listtransactions2', |
|||
'address': atomic_explorer_input_data_val, |
|||
'count': 100, |
|||
'skip': 0, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_listunspent': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listunspent', |
|||
'address': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_listspent': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listspent', |
|||
'address': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_listunspent2': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listunspent2', |
|||
'address': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_getblockhash': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getblockhash', |
|||
'height': 100, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_getblock': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getblock', |
|||
'hash': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_gettxin': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'gettxin', |
|||
'vout': 0, |
|||
'txid': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_gettxout': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'gettxout', |
|||
'vout': 0, |
|||
'txid': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_gettransaction': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'gettransaction', |
|||
'txid': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_getbalance': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getbalance', |
|||
'address': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'dex_getsupply': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getbalance', |
|||
'address': '*', |
|||
'symbol': atomic_explorer_select_coin_val, |
|||
'timeout': 600000 |
|||
}; |
|||
break; |
|||
case 'dex_sendrawtransaction': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'sendrawtransaction', |
|||
'signedtx': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val |
|||
}; |
|||
break; |
|||
case 'basilisk_refresh': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'basilisk', |
|||
'method': 'refresh', |
|||
'address': atomic_explorer_input_data_val, |
|||
'symbol': atomic_explorer_select_coin_val, |
|||
'timeout': 600000 |
|||
}; |
|||
break; |
|||
case 'jumblr_status': |
|||
ExplorerInputData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'jumblr', |
|||
'method': 'status' |
|||
}; |
|||
break; |
|||
} |
|||
console.log(ExplorerInputData); |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ExplorerInputData), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
console.log(data); |
|||
if (atomic_explorer_select_command_val === 'txid' || |
|||
atomic_explorer_select_command_val === 'dex_getbestblockhash' || |
|||
atomic_explorer_select_command_val === 'dex_sendrawtransaction' || |
|||
atomic_explorer_select_command_val === 'dex_getblockhash') { |
|||
$('#atomic-explorer-commands-output').html(data); |
|||
} else { |
|||
var ExplorerOutputData = JSON.parse(data); |
|||
console.log(ExplorerOutputData); |
|||
$('#atomic-explorer-commands-output').html(JSON.stringify(ExplorerOutputData, null, '\t')); |
|||
} |
|||
|
|||
if (ExplorerOutputData.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].DASHBOARD.LESS_RESPONSES_REQ, _lang[defaultLang].DASHBOARD.BASILISC_NOTIFICATION) |
|||
} |
|||
|
|||
NProgress.done(); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
|
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
|
|||
console.log(textStatus); |
|||
console.log(error); |
|||
NProgress.done(); |
|||
} |
|||
}); |
|||
}); |
|||
}; |
|||
|
|||
return { |
|||
//main function to initiate the module
|
|||
init: function() { |
|||
handleExplorer(); |
|||
} |
|||
}; |
|||
}(); |
|||
|
|||
jQuery(document).ready(function() { |
|||
AtomicExplorer.init(); |
|||
}); |
@ -1,5 +0,0 @@ |
|||
if (navigator.appName == 'Microsoft Internet Explorer') { |
|||
$('#section-login').fadeOut(); |
|||
$('#section-ie-warning').fadeIn(); |
|||
$(body).css('background-color', '#757575'); |
|||
} |
@ -1,335 +0,0 @@ |
|||
// DOM Ready =============================================================
|
|||
$(document).ready(function() { |
|||
// By default set USD as Fiat Currency if there's none selected already.
|
|||
if ( localStorage.getItem('EasyDEX_FiatCurrency') == null ) { |
|||
var FiatCurrency = 'USD'; |
|||
localStorage.setItem('EasyDEX_FiatCurrency', FiatCurrency); |
|||
} |
|||
}); |
|||
|
|||
// Functions =============================================================
|
|||
|
|||
var fiat_symbol; |
|||
function getCurrency() { |
|||
if (localStorage.getItem('EasyDEX_FiatCurrency') == 'USD' || |
|||
localStorage.getItem('EasyDEX_FiatCurrency') == 'NZD' || |
|||
localStorage.getItem('EasyDEX_FiatCurrency') == 'AUD' ) { |
|||
fiat_symbol = '$'; |
|||
} |
|||
if ( localStorage.getItem('EasyDEX_FiatCurrency') == 'INR' ) { |
|||
fiat_symbol = '₹'; |
|||
} |
|||
if ( localStorage.getItem('EasyDEX_FiatCurrency') == 'CNY' || localStorage.getItem('EasyDEX_FiatCurrency') == 'JPY' ) { |
|||
fiat_symbol = '¥'; |
|||
} |
|||
if ( localStorage.getItem('EasyDEX_FiatCurrency') == 'GBP' ) { |
|||
fiat_symbol = '£'; |
|||
} |
|||
if ( localStorage.getItem('EasyDEX_FiatCurrency') == 'EUR' ) { |
|||
fiat_symbol = '€'; |
|||
} |
|||
} |
|||
|
|||
function sendCurrency(val) { |
|||
console.log(val); |
|||
$('#mdl_currency_balance').text($('span[data-currency="' + val.currency + '"][id="currency-balance"]').text()); |
|||
$('#mdl_currency_sendto').attr('placeholder', _lang[defaultLang].INDEX.ENTER + ' ' + val.currency + ' ' + _lang[defaultLang].INDEX.ADDR_SM); |
|||
$( |
|||
'#mdl_currency_amount_label,' + |
|||
'#mdl_currency_coin,' + |
|||
'#mdl_currency_total_coinname' |
|||
) |
|||
.text(val.currency); |
|||
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
getinfoValues = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': val.currency, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getinfo' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(getinfoValues), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var CoinInfoData = JSON.parse(data), |
|||
label_color = '', |
|||
label_icon = '', |
|||
wallettblContent = ''; |
|||
|
|||
$('#mdl_currency_fee').val(CoinInfoData.txfee); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function ReceiveCurrency(rec_val) { |
|||
console.log(rec_val); |
|||
if ( sessionStorage.getItem('IguanaActiveAccount') === null ) { |
|||
console.log('=> No wallet logged in. No need to get Rates.'); |
|||
} else { |
|||
var tmp_activhndl = JSON.parse(sessionStorage.getItem('IguanaActiveAccount')), |
|||
coinAddr = JSON.parse(tmp_activhndl)[rec_val.currency]; |
|||
$('#mdl_receive_coin_name').text(rec_val.currency) |
|||
$('#mdl_receive_coin_addr').text(''); |
|||
$('#mdl_receive_coin_addr').val(coinAddr); |
|||
$('#mdl_receive_coin_addr_qr_code').text(''); |
|||
$('#mdl_receive_coin_addr_qr_code').qrcode({ |
|||
width: 120, |
|||
height: 120, |
|||
text: coinAddr |
|||
}); |
|||
} |
|||
|
|||
var clipboard = new Clipboard('.btn'); |
|||
clipboard.on('success', function(e) { |
|||
console.log(e); |
|||
}); |
|||
clipboard.on('error', function(e) { |
|||
console.log(e); |
|||
}); |
|||
} |
|||
|
|||
$('#mdl_currency_amount').keyup(function() { |
|||
var sum_val1 = parseFloat($('#mdl_currency_amount').val()), |
|||
sum_val2 = parseFloat($('#mdl_currency_fee').val()), |
|||
total_of_currency_fee = sum_val1 + sum_val2, |
|||
currency_fiat_value = '', |
|||
fiat_symbol = '', |
|||
mdl_send_btn = $('#mdl_currency_send_btn'); |
|||
|
|||
if ( $('#mdl_currency_total_coinname').text() == 'BTCD' ) { |
|||
currency_fiat_value = localStorage.getItem('EasyDEX_BTCD_Fiat_pair_value'); |
|||
} |
|||
if ( $('#mdl_currency_total_coinname').text() == 'BTC' ) { |
|||
currency_fiat_value = localStorage.getItem('EasyDEX_BTC_Fiat_pair_value'); |
|||
} |
|||
|
|||
getCurrency(); |
|||
var total_of_currency_fiat = total_of_currency_fee * currency_fiat_value; |
|||
$('#mdl_currency_total_value').text(total_of_currency_fee.toFixed(8)); |
|||
$('#mdl_currency_total_fiat_value').text(fiat_symbol + total_of_currency_fiat.toFixed(2)); |
|||
|
|||
if ($('#mdl_currency_amount').val() != '' && $('#mdl_currency_sendto') != '' && $('#mdl_currency_fee') != '' ) { |
|||
mdl_send_btn.removeClass('disabled'); |
|||
mdl_send_btn.attr('data-dismiss', 'modal'); |
|||
mdl_send_btn.attr('data-target', '#SendCoinModelStep2'); |
|||
mdl_send_btn.attr('onclick', 'ConfirmsendCurrency($(this).data())'); |
|||
} else { |
|||
mdl_send_btn.addClass('disabled'); |
|||
mdl_send_btn.removeAttr('data-dismiss'); |
|||
mdl_send_btn.removeAttr('data-target'); |
|||
mdl_send_btn.removeAttr('onclick'); |
|||
} |
|||
}); |
|||
|
|||
$('#mdl_currency_fee').keyup(function() { |
|||
var sum_val1 = parseFloat($('#mdl_currency_amount').val()), |
|||
sum_val2 = parseFloat($('#mdl_currency_fee').val()), |
|||
total_of_currency_fee = sum_val1 + sum_val2, |
|||
currency_fiat_value = '', |
|||
fiat_symbol = ''; |
|||
|
|||
if ( $('#mdl_currency_total_coinname').text() == 'BTCD' ) { |
|||
currency_fiat_value = localStorage.getItem('EasyDEX_BTCD_Fiat_pair_value'); |
|||
} |
|||
if ( $('#mdl_currency_total_coinname').text() == 'BTC' ) { |
|||
currency_fiat_value = localStorage.getItem('EasyDEX_BTC_Fiat_pair_value'); |
|||
} |
|||
|
|||
getCurrency(); |
|||
|
|||
var total_of_currency_fiat = total_of_currency_fee * currency_fiat_value; |
|||
$('#mdl_currency_total_value').text(total_of_currency_fee.toFixed(8)); |
|||
$('#mdl_currency_total_fiat_value').text(fiat_symbol + total_of_currency_fiat.toFixed(2)); |
|||
}); |
|||
|
|||
function CurrencyMdlBtnClean() { |
|||
$( |
|||
'#mdl_currency_sendto,' + |
|||
'#mdl_currency_amount' |
|||
) |
|||
.val(''); |
|||
$( |
|||
'#mdl_currency_total_value,' + |
|||
'#mdl_currency_total_fiat_value' |
|||
) |
|||
.text('0.00'); |
|||
} |
|||
|
|||
function ReceiveCoinMdlBtnClean() { |
|||
$( |
|||
'#mdl_receive_coin_addr,' + |
|||
'#mdl_receive_coin_addr_qr_code' |
|||
) |
|||
.text(''); |
|||
} |
|||
|
|||
function ConfirmsendCurrency(confirm_val) { |
|||
var confirm_coinname = $('#mdl_currency_total_coinname').text(), |
|||
confirm_selected_from_addr = $('div[data-currency="' + confirm_coinname + '"][id="currency-addr"]').text(), |
|||
confirm_send_amount_fiat = '', |
|||
confirm_send_amount_fee_fiat = '', |
|||
currency_fiat_value = '', |
|||
fiat_symbol = ''; |
|||
|
|||
if ( $('#mdl_currency_total_coinname').text() == 'BTCD' ) { |
|||
currency_fiat_value = localStorage.getItem('EasyDEX_BTCD_Fiat_pair_value'); |
|||
} |
|||
if ( $('#mdl_currency_total_coinname').text() == 'BTC' ) { |
|||
currency_fiat_value = localStorage.getItem('EasyDEX_BTC_Fiat_pair_value'); |
|||
} |
|||
|
|||
getCurrency(); |
|||
|
|||
$('#mdl_confirm_currency_sendto_addr').text($('#mdl_currency_sendto').val()); |
|||
$('#mdl_confirm_currency_send_amount').text($('#mdl_currency_amount').val()); |
|||
$( |
|||
'#mdl_confirm_currency_coinname,' + |
|||
'#mdl_confirm_currency_coinname_total,' + |
|||
'#mdl_confirm_currency_coinname_fee' |
|||
) |
|||
.text(confirm_coinname); |
|||
$('#mdl_confirm_currency_send_amount_fiat').text(fiat_symbol + ($('#mdl_confirm_currency_send_amount').text() * currency_fiat_value).toFixed(2)); |
|||
$('#mdl_confirm_currency_send_fee').text($('#mdl_currency_fee').val()); |
|||
$('#mdl_confirm_currency_send_fee_fiat').text(fiat_symbol + ($('#mdl_confirm_currency_send_fee').text() * currency_fiat_value).toFixed(2)); |
|||
$('#mdl_confirm_currency_sendfrom_addr').text(confirm_selected_from_addr); |
|||
$('#mdl_confirm_currency_sendfrom_total_dedcut').text($('#mdl_currency_total_value').text()); |
|||
$('#mdl_confirm_currency_sendfrom_total_deduct_fiat').text($('#mdl_currency_total_fiat_value').text()); |
|||
} |
|||
|
|||
function ExecuteSendCurrencyAPI() { |
|||
console.log('==> SendToAddress API Executed <=='); |
|||
|
|||
var confirm_coinname_to_send = $('#mdl_confirm_currency_coinname').text(), |
|||
confirm_send_amount = $('#mdl_confirm_currency_sendfrom_total_dedcut').text(), |
|||
confirm_sendto_address = $('#mdl_confirm_currency_sendto_addr').text(); |
|||
|
|||
// Get parameters values from confirm dialog and send currency
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
sendtoaddrvalues = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': confirm_coinname_to_send, |
|||
'method': 'sendtoaddress', |
|||
'params': [ |
|||
confirm_sendto_address, |
|||
confirm_send_amount, |
|||
'EasyDEX', |
|||
'EasyDEXTransaction' |
|||
] |
|||
}; |
|||
|
|||
console.log(sendtoaddrvalues); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(sendtoaddrvalues), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var SendToAddrData = JSON.parse(data), |
|||
SendToAddrTxDataTitle; |
|||
|
|||
console.log('== Data OutPut =='); |
|||
console.log(SendToAddrData); |
|||
if ( SendToAddrData.error != 'couldnt create rawtx' ) { |
|||
SendToAddrTxDataTitle = _lang[defaultLang].COIN_WALLETS.TX_FAILED; |
|||
} |
|||
if ( SendToAddrData.sendrawtransaction == 'success' ) { |
|||
SendToAddrTxDataTitle = _lang[defaultLang].COIN_WALLETS.TX_SUCCESS; |
|||
} |
|||
|
|||
var SentToAddrTxData = '<font style="font-size: 13px; font-family: Menlo,Monaco,Consolas,Courier New,monospace">' + |
|||
'<font style="font-weight: 800">' + |
|||
'<b>' + _lang[defaultLang].COIN_WALLETS.TX + ' ID:</b>' |
|||
'</font>' + |
|||
SendToAddrData.result + |
|||
'</font>'; |
|||
bootbox.dialog({ |
|||
title: SendToAddrTxDataTitle, |
|||
message: SentToAddrTxData |
|||
}); |
|||
|
|||
if ( SendToAddrData.sendrawtransaction == 'success' ) { |
|||
toastr.success(_lang[defaultLang].TOASTR.TX_SENT, _lang[defaultLang].TOASTR.TX_NOTIFICATION); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
toastr.error(_lang[defaultLang].TOASTR.TX_SEND_ERR, _lang[defaultLang].TOASTR.TX_NOTIFICATION); |
|||
} |
|||
}); |
|||
|
|||
// Clear Send Dialog values and set them to blank
|
|||
$( |
|||
'#mdl_currency_coin,' + |
|||
'#mdl_currency_balance,' + |
|||
'#mdl_currency_amount_label,' + |
|||
'#mdl_currency_total_coinname' |
|||
) |
|||
.text(''); |
|||
|
|||
// Clear Confirm Dialog values and set them to blank
|
|||
$( |
|||
'#mdl_confirm_currency_sendto_addr,' + |
|||
'#mdl_confirm_currency_send_amount,' + |
|||
'#mdl_confirm_currency_coinname,' + |
|||
'#mdl_confirm_currency_send_amount_fiat,' + |
|||
'#mdl_confirm_currency_send_fee,' + |
|||
'#mdl_confirm_currency_coinname_fee,' + |
|||
'#mdl_confirm_currency_send_fee_fiat,' + |
|||
'#mdl_confirm_currency_sendfrom_addr,' + |
|||
'#mdl_confirm_currency_sendfrom_total_dedcut,' + |
|||
'#mdl_confirm_currency_coinname_total,' + |
|||
'#mdl_confirm_currency_sendfrom_total_deduct_fiat' |
|||
) |
|||
.text(''); |
|||
|
|||
// Clean send dialog button fields
|
|||
CurrencyMdlBtnClean(); |
|||
} |
|||
|
|||
// Used this function to set desired Fiat Currency, selected from top menu bar of EasyDEX UI
|
|||
function WalletFiatCurrency(fiat_currency_value) { |
|||
var FiatCurrency = fiat_currency_value.fiatcurrency; |
|||
localStorage.setItem('EasyDEX_FiatCurrency', FiatCurrency); |
|||
} |
|||
|
|||
function Iguana_rmd160conv(rmd160conv_data) { |
|||
// comment
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'rmd160conv', |
|||
'rmd160': rmd160conv_data.rmd160, |
|||
'coin': rmd160conv_data.coin |
|||
}; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
console.log('== Data OutPut =='); |
|||
console.log(AjaxOutputData); |
|||
return AjaxOutputData; |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
@ -1,3 +0,0 @@ |
|||
const config = { |
|||
'iguanaPort': 7778 |
|||
}; |
File diff suppressed because it is too large
@ -1,261 +0,0 @@ |
|||
function ShowBasiliskFetchDataProgress(coin) { |
|||
var active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'); |
|||
|
|||
Shepherd_GetBasiliskCache() |
|||
.then(function(result) { |
|||
var _data = JSON.parse(result), |
|||
NOT_FOUND = 'NOT FOUND', |
|||
query = _data.result.basilisk, |
|||
coin_exists = true, |
|||
addresses_exists = true, |
|||
getbalance_exists = true, |
|||
listtransactions_exists = true, |
|||
listunspent_exists = true, |
|||
refresh_exists = true, |
|||
getbalance_status = NOT_FOUND, |
|||
listtransactions_status = NOT_FOUND, |
|||
listunspent_status = NOT_FOUND, |
|||
refresh_status = NOT_FOUND, |
|||
res_data; |
|||
|
|||
res_data = { |
|||
'addresses': false, |
|||
'getbalance': false, |
|||
'listtransactions': false, |
|||
'listunspent': false, |
|||
'refresh': false |
|||
} |
|||
|
|||
if (!query) { |
|||
res_data.coin = false; |
|||
} else if (!query[coin]) { |
|||
coin_exists = false; |
|||
res_data.coin = coin_exists; |
|||
} else if (!('addresses' in query[coin])) { |
|||
addresses_exists = false; |
|||
res_data.coin = coin_exists; |
|||
} else { |
|||
Promise.all(query[coin].addresses.map((coinaddr_value,coinaddr_index) => { |
|||
return new Promise((resolve, reject) => { |
|||
var data = query[coin][coinaddr_value].getbalance; |
|||
|
|||
if (!('getbalance' in query[coin][coinaddr_value])) { |
|||
getbalance_exists = false; |
|||
} else { |
|||
getbalance_status = query[coin][coinaddr_value].getbalance.status; |
|||
} |
|||
|
|||
if (!('listtransactions' in query[coin][coinaddr_value])) { |
|||
listtransactions_exists = false; |
|||
} else { |
|||
listtransactions_status = query[coin][coinaddr_value].listtransactions.status; |
|||
} |
|||
|
|||
if (!('listunspent' in query[coin][coinaddr_value])) { |
|||
listunspent_exists = false; |
|||
} else { |
|||
listunspent_status = query[coin][coinaddr_value].listunspent.status; |
|||
} |
|||
|
|||
if (!('refresh' in query[coin][coinaddr_value])) { |
|||
refresh_exists = false; |
|||
} else { |
|||
refresh_status = query[coin][coinaddr_value].refresh.status; |
|||
} |
|||
|
|||
pass_data = { |
|||
'addr_index': coinaddr_index, |
|||
'addr_value': coinaddr_value, |
|||
'getbalance': getbalance_exists, |
|||
'getbalance_status': getbalance_status, |
|||
'listtransactions': listtransactions_exists, |
|||
'listtransactions_status': listtransactions_status, |
|||
'listunspent': listunspent_exists, |
|||
'listunspent_status': listunspent_status, |
|||
'refresh': refresh_exists, |
|||
'refresh_status': refresh_status |
|||
}; |
|||
|
|||
resolve(pass_data); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
var BasiliskFetchData = ''; |
|||
|
|||
$.each(result, function(result_index, result_val) { |
|||
var tmp_listunspent_lable_color = '', |
|||
tmp_listtransactions_lable_color = '', |
|||
tmp_getbalance_lable_color = '', |
|||
tmp_refresh_lable_color = ''; |
|||
|
|||
switch (result_val.listunspent_status) { |
|||
case 'waiting': |
|||
tmp_listunspent_lable_color = 'dark'; |
|||
break; |
|||
case 'in progress': |
|||
tmp_listunspent_lable_color = 'primary'; |
|||
break; |
|||
case 'done': |
|||
tmp_listunspent_lable_color = 'success'; |
|||
break; |
|||
case NOT_FOUND: |
|||
tmp_listunspent_lable_color = 'danger'; |
|||
break; |
|||
} |
|||
|
|||
switch (result_val.listtransactions_status) { |
|||
case 'waiting': |
|||
tmp_listtransactions_lable_color = 'dark'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').show(); |
|||
break; |
|||
case 'in progress': |
|||
tmp_listtransactions_lable_color = 'primary'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').show(); |
|||
break; |
|||
case 'done': |
|||
tmp_listtransactions_lable_color = 'success'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').hide(); |
|||
break; |
|||
case NOT_FOUND: |
|||
tmp_listtransactions_lable_color = 'danger'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').show(); |
|||
break; |
|||
} |
|||
|
|||
switch (result_val.getbalance_status) { |
|||
case 'waiting': |
|||
tmp_getbalance_lable_color = 'dark'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').show(); |
|||
break; |
|||
case 'in progress': |
|||
tmp_getbalance_lable_color = 'primary'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').show(); |
|||
break; |
|||
case 'done': |
|||
tmp_getbalance_lable_color = 'success'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').hide(); |
|||
break; |
|||
case NOT_FOUND: |
|||
tmp_getbalance_lable_color = 'danger'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').show(); |
|||
break; |
|||
} |
|||
|
|||
switch (result_val.refresh_status) { |
|||
case 'waiting': |
|||
tmp_refresh_lable_color = 'dark'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').show(); |
|||
break; |
|||
case 'in progress': |
|||
tmp_refresh_lable_color = 'primary'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').show(); |
|||
break; |
|||
case 'done': |
|||
tmp_refresh_lable_color = 'success'; |
|||
$('#edexcoin_dashboard_basilisk_refresh_status').hide(); |
|||
break; |
|||
case NOT_FOUND: |
|||
tmp_refresh_lable_color = 'danger'; |
|||
break; |
|||
} |
|||
|
|||
BasiliskFetchData += |
|||
'<tr>'; |
|||
'<td>' + result_val.addr_value.substring(0,5) + '...</td>' + |
|||
'<td>' + |
|||
'<span class="label label-' + tmp_listunspent_lable_color + ' text-uppercase">' + result_val.listunspent_status + '</span>' + |
|||
'</td>' + |
|||
'<td>' + |
|||
'<span class="label label-' + tmp_listtransactions_lable_color + ' text-uppercase">' + result_val.listtransactions_status + '</span>' + |
|||
'</td>' + |
|||
'<td>' + |
|||
'<span class="label label-' + tmp_getbalance_lable_color + ' text-uppercase">' + result_val.getbalance_status + '</span>' + |
|||
'</td>' + |
|||
'<td>' + |
|||
'<span class="label label-' + tmp_refresh_lable_color + ' text-uppercase">' + result_val.refresh_status + '</span>' + |
|||
'</td>' + |
|||
'</tr>'; |
|||
$('.tbl_edexcoin_dashboard_basilisk_refresh_status tbody').html(BasiliskFetchData); |
|||
}); |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function SwitchBasicliskFull(switch_data) { |
|||
var relay_value = '', |
|||
validate_value = '', |
|||
mode_value = ''; |
|||
|
|||
if ( switch_data.modecode == 'B' ) { |
|||
relay_value = 1; |
|||
validate_value = 1; |
|||
mode_value = 'Basilisk'; |
|||
} |
|||
if ( switch_data.modecode == 'F' ) { |
|||
relay_value = 0; |
|||
validate_value = 0; |
|||
mode_value = 'Full'; |
|||
} |
|||
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
SwitchCoinModeData = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'poll': 100, |
|||
'immediate':100, |
|||
'active': 1, |
|||
'newcoin': switch_data.currency, |
|||
'startpend': 1, |
|||
'endpend': 1, |
|||
'services': 128, |
|||
'maxpeers': 16, |
|||
'RELAY': relay_value, |
|||
'VALIDATE': validate_value, |
|||
'portp2p': 14631 |
|||
}; |
|||
|
|||
// Switch selected coins' mode
|
|||
$.ajax({ |
|||
type: 'GET', |
|||
data: SwitchCoinModeData, |
|||
url: 'http://127.0.0.1:' + config.iguanaPort + '/api/iguana/addcoin', |
|||
dataType: 'text', |
|||
success: function(data, textStatus, jqXHR) { |
|||
var SwitchCoinDataOutput = JSON.parse(data); |
|||
|
|||
if (SwitchCoinDataOutput.result === 'coin added') { |
|||
console.log('coin added'); |
|||
toastr.success(switch_data.currency + ' ' + _lang[defaultLang].TOASTR.SWITCHED_TO + ' ' + mode_value + ' ' + _lang[defaultLang].TOASTR.MODE, _lang[defaultLang].TOASTR.COIN_NOTIFICATION); |
|||
} else if (SwitchCoinDataOutput.result === 'coin already there') { |
|||
console.log('coin already there'); |
|||
} else if (SwitchCoinDataOutput.result === null) { |
|||
console.log('coin already there'); |
|||
} |
|||
}, |
|||
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); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function getBasiliskCoinBalance(coin) { |
|||
EDEXMainAddr(coin) |
|||
.then(function(result){ |
|||
console.log(result); |
|||
|
|||
EDEX_DEXlistunspent(coin, result) |
|||
.then(function(result_listunspent) { |
|||
console.log(result_listunspent[0].amount); |
|||
$('span[data-edexcoincode="' + coin + '"][id="edexcoin-balance"]').text(result_listunspent[0].amount); |
|||
}); |
|||
}) |
|||
} |
@ -1,207 +0,0 @@ |
|||
function getCoinBalance(coin) { |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|||
|
|||
EDEXlistunspent(active_edexcoin) |
|||
.then(function(result) { |
|||
console.log(result) |
|||
if (result[0] != undefined) { |
|||
if ( result[0].interest !== undefined ) { |
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.show(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-12' ) |
|||
.addClass( 'col-lg-4' ); |
|||
$('#edex_interest_balance').text(result[0].interest); |
|||
$('#edex_total_balance_interest').text(result[0].totalbalance); |
|||
$('#edex_total_interest_coincode').text(active_edexcoin); |
|||
$('#edex_total_balance_interest_coincode').text(active_edexcoin); |
|||
} |
|||
|
|||
if ( result[0].interest === undefined ) { |
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.hide(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-4' ) |
|||
.addClass( 'col-lg-12' ); |
|||
$( |
|||
'#edex_interest_balance,' + |
|||
'#edex_total_balance_interest' |
|||
) |
|||
.text('-'); |
|||
} |
|||
|
|||
$('#edex_total_balance').text(result[0].total); |
|||
$('#edex_total_balance_coincode').text(active_edexcoin); |
|||
} else { |
|||
$('span[data-edexcoincode="' + coin + '"][id="edexcoin-balance"]').text('0'); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function StopShowCoinHistory() { |
|||
clearInterval(ExecuteShowCoinHistory); |
|||
console.log('Stopped executing History and ProgressBar API.'); |
|||
} |
|||
|
|||
function TotalFiatValue() { |
|||
var BTC_balance = $('span[data-currency="BTC"][id="currency-balance"]').text(), |
|||
BTCD_balance = $('span[data-currency="BTCD"][id="currency-balance"]').text(), |
|||
Fiat_Currency = localStorage.getItem('EasyDEX_FiatCurrency'), |
|||
BTC_Fiat_pair_value = '', |
|||
Conversion_Fiat_Pair = '', |
|||
BTCD_Fiat_pair_value = ''; |
|||
|
|||
$('span[data-currency="BTC"][id="header_coinname_balance"]').text(BTC_balance + ' BTC'); |
|||
$('span[data-currency="BTCD"][id="header_coinname_balance"]').text(BTCD_balance + ' BTCD'); |
|||
|
|||
if ( Fiat_Currency == 'USD' ) { |
|||
BTC_Fiat_pair_value = 'BTC/' + Fiat_Currency; |
|||
Conversion_Fiat_Pair = 'EUR/USD'; |
|||
} else { |
|||
BTC_Fiat_pair_value = 'BTC/USD'; |
|||
Conversion_Fiat_Pair = Fiat_Currency + '/USD'; |
|||
} |
|||
|
|||
var TotalFiatValueData = { |
|||
'agent': 'iguana', |
|||
'method': 'rates', |
|||
'quotes': [ |
|||
'BTCD/BTC', |
|||
BTC_Fiat_pair_value, |
|||
Conversion_Fiat_Pair |
|||
], |
|||
'immediate': 100, |
|||
'timeout': 5000 |
|||
}; |
|||
|
|||
if ( sessionStorage.getItem('IguanaActiveAccount') === null ) { |
|||
console.log('=> No wallet logged in. No need to get Rates.'); |
|||
} else { |
|||
// Get Rates
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(TotalFiatValueData), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var RatesData = JSON.parse(data), |
|||
label_color = '', |
|||
label_icon = '', |
|||
wallettblContent = ''; |
|||
|
|||
localStorage.setItem('EasyDEX_BTCD_BTC_pair_value', RatesData.rates[0]['BTCD/BTC']); // e.g BTCD/BTC
|
|||
localStorage.setItem('EasyDEX_BTC_Fiat_pair_value', RatesData.rates[1][BTC_Fiat_pair_value]); // e.g BTC/USD
|
|||
localStorage.setItem('EasyDEX_Conversion_Fiat_Pair', Conversion_Fiat_Pair); // e.g EUR/USD
|
|||
localStorage.setItem('EasyDEX_Conversion_Fiat_Pair_value', RatesData.rates[2][Conversion_Fiat_Pair]); // e.g EUR/USD: 1.11830926
|
|||
|
|||
var tmp_btcd_btc = RatesData.rates[0], |
|||
tmp_btc_fiat = RatesData.rates[1]; |
|||
|
|||
BTCD_Fiat_pair_value = parseFloat(tmp_btcd_btc['BTCD/BTC']) * parseFloat(tmp_btc_fiat[BTC_Fiat_pair_value]); |
|||
localStorage.setItem('EasyDEX_BTCD_Fiat_pair_value', BTCD_Fiat_pair_value); // e.g BTCD/USD: 2.0873619962
|
|||
|
|||
var tmp_btcd_fiat_toal = parseFloat(BTCD_balance) * parseFloat(BTCD_Fiat_pair_value), |
|||
tmp_btc_fiat_toal = parseFloat(BTC_balance) * parseFloat(tmp_btc_fiat[BTC_Fiat_pair_value]); |
|||
|
|||
$('span[data-currency="BTC"][id="header_coinfiatbalance"]').text(tmp_btc_fiat_toal.toFixed(2) + ' ' + Fiat_Currency); |
|||
$('span[data-currency="BTCD"][id="header_coinfiatbalance"]').text(tmp_btcd_fiat_toal.toFixed(2) + ' ' + Fiat_Currency); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
|
|||
function StopTotalFiatValue() { |
|||
clearInterval(RunTotalFiatValue); |
|||
console.log('Stopped executing Total Fiat Value API with Rates'); |
|||
} |
|||
|
|||
function ShowCoinProgressBar(coin) { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
getinfoValues = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getinfo', |
|||
'immediate': 100, |
|||
'timeout': 4000 |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(getinfoValues), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var CoinInfoData = JSON.parse(data); |
|||
|
|||
// TODO: refactor
|
|||
if (typeof CoinInfoData.bundles == 'undefined') { |
|||
|
|||
} else { |
|||
if ( parseInt(CoinInfoData.RTheight) != 0 ) { |
|||
var coin_blocks = parseInt(CoinInfoData.blocks), |
|||
coin_blocks_plus1 = coin_blocks + 1; |
|||
|
|||
sessionStorage.setItem('Activate' + coin + 'History', 'Yes'); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-progressbars"]').show(); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]').width(parseFloat(CoinInfoData.bundles).toFixed(2) + '%'); |
|||
$('span[data-edexcoin="' + coin + '"][id="currency-bundles-percent"]') |
|||
.text('(' + coin + ') ' + parseFloat(CoinInfoData.bundles).toFixed(2) + '% - ( ' + coin_blocks_plus1 + ' / '+ CoinInfoData.longestchain + ' ) ==>> RT' + CoinInfoData.RTheight); |
|||
$('div[data-edexcoin="' + coin + '"][id="additional-progress-bars"]').hide(); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]') |
|||
.removeClass( 'progress-bar-info' ) |
|||
.addClass( 'progress-bar-indicating progress-bar-success' ); |
|||
$('#edex-footer').css('height', '11px'); |
|||
resizeDashboardWindow(); |
|||
$('#edexcoin-wallet-waitingrt-alert').hide(); |
|||
} |
|||
if ( parseInt(CoinInfoData.RTheight) == 0 ) { |
|||
var coin_blocks = parseInt(CoinInfoData.blocks), |
|||
coin_blocks_plus1 = coin_blocks + 1; |
|||
|
|||
sessionStorage.setItem('Activate' + coin + 'History', 'No'); |
|||
console.log(coin + ': ' + CoinInfoData.bundles); |
|||
$('div[data-edexcoin="' + coin + '"][id="additional-progress-bars"]').show(); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-progressbars"]').show(); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]') |
|||
.removeClass( 'progress-bar-indicating progress-bar-success' ) |
|||
.addClass( 'progress-bar-info' ); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]').width(parseFloat(CoinInfoData.bundles).toFixed(2) + '%'); |
|||
$('span[data-edexcoin="' + coin + '"][id="currency-bundles-percent"]') |
|||
.text('(' + coin + ') ' + parseFloat(CoinInfoData.bundles).toFixed(2) + '% - ( ' + coin_blocks_plus1 + ' / ' + CoinInfoData.longestchain + ' )'); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-utxo"]').width(parseFloat(CoinInfoData.utxo).toFixed(2) + '%'); |
|||
$('span[data-edexcoin="' + coin + '"][id="currency-utxo-percent"]').text('(' + coin + ') ' + parseFloat(CoinInfoData.utxo).toFixed(2) + '%'); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-balances"]').width(parseFloat(CoinInfoData.balances).toFixed(2) + '%'); |
|||
$('span[data-edexcoin="' + coin + '"][id="currency-balances-percent"]').text('(' + coin + ') '+parseFloat(CoinInfoData.balances).toFixed(2) + '%'); |
|||
$('div[data-edexcoin="' + coin + '"][id="currency-validated"]').width(parseFloat(CoinInfoData.validated).toFixed(2) + '%'); |
|||
$('span[data-edexcoin="' + coin + '"][id="currency-validated-percent"]').text('(' + coin + ') '+parseFloat(CoinInfoData.validated).toFixed(2) + '%'); |
|||
$('#edex-footer').css('height', '44px'); |
|||
resizeDashboardWindow(); |
|||
$('#edexcoin-wallet-waitingrt-alert').show(); |
|||
} |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
@ -1,262 +0,0 @@ |
|||
function getDEXCoinBalance(coin) { |
|||
getDEXGetBalance_cache(coin).then(function(result) { |
|||
console.log(result); |
|||
}); |
|||
} |
|||
|
|||
function getDEXGetBalance(coin) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
return new Promise((resolve) => { |
|||
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data_2 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getaddressesbyaccount', |
|||
'account': '*' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
data: JSON.stringify(ajax_data_2), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.then(data => { |
|||
var total_balance = 0, |
|||
total_interest = 0; |
|||
|
|||
Promise.all(data.result.map((coinaddr_value, coinaddr_index) => { |
|||
let params = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getbalance', |
|||
'address': coinaddr_value, |
|||
'symbol': coin |
|||
}; |
|||
|
|||
console.log(params); |
|||
|
|||
return new Promise((resolve, reject) => { |
|||
$.ajax({ |
|||
data: JSON.stringify(params), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.then(data => { |
|||
console.log(data); |
|||
total_balance = total_balance + data.balance; |
|||
|
|||
if (data.interest !== undefined) { |
|||
total_interest = total_interest + data.interest; |
|||
pass_data = { |
|||
'total': total_balance.toFixed(8), |
|||
'interest': total_interest.toFixed(8) |
|||
} |
|||
} |
|||
|
|||
if (data.interest == undefined) { |
|||
pass_data = { 'total': total_balance }; |
|||
} |
|||
|
|||
console.log(pass_data); |
|||
resolve(pass_data); |
|||
}); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
resolve(result[result.length - 1]); |
|||
NProgress.done(); |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function getDEXGetBalance_cache(coin) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
return new Promise((resolve) => { |
|||
Shepherd_CheckBasiliskCacheData(coin) |
|||
.then(function(result) { |
|||
if (result.coin == false || result.addresses == false) { |
|||
var call_data = { |
|||
'allcoins': false, |
|||
'coin': coin, |
|||
'calls': 'listtransactions:getbalance:refresh' |
|||
}; |
|||
Shepherd_FetchBasiliskData(call_data) |
|||
.then(function(result) { |
|||
console.log(result); |
|||
}); |
|||
} else if (result.getbalance == false) { |
|||
var call_data = { |
|||
'allcoins': false, |
|||
'coin': coin, |
|||
'calls': 'getbalance:listtransactions' |
|||
}; |
|||
Shepherd_FetchBasiliskData(call_data).then(function(result) { |
|||
console.log(result); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
Shepherd_GetBasiliskCache() |
|||
.then(function(result) { |
|||
var _data = JSON.parse(result), |
|||
query = _data.result.basilisk, |
|||
total_balance = 0, |
|||
total_interest = 0; |
|||
|
|||
Promise.all(query[coin].addresses.map((coinaddr_value, coinaddr_index) => { |
|||
return new Promise((resolve, reject) => { |
|||
if ( query[coin][coinaddr_value].getbalance.data !== undefined ) { |
|||
var data = query[coin][coinaddr_value].getbalance.data; |
|||
|
|||
total_balance = parseFloat(total_balance) + parseFloat(data.balance); |
|||
if (data.interest !== undefined) { |
|||
total_interest = parseFloat(total_interest) + parseFloat(data.interest); |
|||
total_final = parseFloat(total_balance) + parseFloat(total_interest); |
|||
pass_data = { |
|||
'total': total_balance.toFixed(8), |
|||
'interest': total_interest.toFixed(8), |
|||
'totalbalance': total_final.toFixed(8) |
|||
}; |
|||
} |
|||
if (data.interest == undefined) { |
|||
if (isNaN(total_balance)) { |
|||
total_balance = parseFloat(0); |
|||
} |
|||
pass_data = { 'total': total_balance.toFixed(8) }; |
|||
} |
|||
} else { |
|||
pass_data = { 'total': 0.00000000 }; |
|||
} |
|||
|
|||
resolve(pass_data); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
if ( result[result.length - 1].total == 0 ) { |
|||
resolve(result[result.length - 2]); |
|||
} else { |
|||
resolve(result[result.length - 1]); |
|||
} |
|||
|
|||
NProgress.done(); |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function getDEXGetBalance2(coin) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data_1 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'activehandle' |
|||
}, |
|||
tmp_coin_addr = null, |
|||
ajax_call_1 = $.ajax({ |
|||
data: JSON.stringify(ajax_data_1), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}), |
|||
ajax_call_2 = ajax_call_1.then(function(data) { |
|||
// .then() returns a new promise
|
|||
tmp_coin_addr = data[coin]; |
|||
|
|||
var ajax_data_2 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listunspent', |
|||
'address': data[coin], |
|||
'symbol': coin |
|||
}; |
|||
|
|||
return $.ajax({ |
|||
data: JSON.stringify(ajax_data_2), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}); |
|||
}); |
|||
|
|||
ajax_call_2.done(function(data) { |
|||
console.log(data); |
|||
if (data.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].BASILISK_NOTIFICATION); |
|||
} |
|||
|
|||
var tmpcalcnum = 0, |
|||
tmpcalcinterest = 0, |
|||
interest_enable = false, |
|||
tmptotalbalance = 0; |
|||
|
|||
$.each(data, function(index) { |
|||
if ( data[index].interest !== undefined ) { |
|||
tmpcalcnum = tmpcalcnum + data[index].amount; |
|||
tmpcalcinterest = tmpcalcinterest + data[index].interest; |
|||
interest_enable = true; |
|||
} |
|||
|
|||
if ( data[index].interest === undefined ) { |
|||
tmpcalcnum = tmpcalcnum + data[index].amount; |
|||
} |
|||
}); |
|||
|
|||
if ( coin == 'KMD' ) { |
|||
tmptotalbalance = parseFloat(tmpcalcnum) + parseFloat(tmpcalcinterest); |
|||
var tmp_addr_total_balance_output = { |
|||
'addr': tmp_coin_addr, |
|||
'total': tmpcalcnum.toFixed(8), |
|||
'interest': tmpcalcinterest.toFixed(8), |
|||
'totalbalance': tmptotalbalance.toFixed(8) |
|||
}; |
|||
} |
|||
if ( coin !== 'KMD' ) { |
|||
var tmp_addr_total_balance_output = { |
|||
'addr': tmp_coin_addr, |
|||
'total': tmpcalcnum.toFixed(8) |
|||
}; |
|||
} |
|||
console.log(tmp_addr_total_balance_output); |
|||
|
|||
if (data == '' ) { |
|||
tmp_addr_total_balance_output = { |
|||
'addr': tmp_coin_addr, |
|||
'total': 0 |
|||
}; |
|||
} |
|||
|
|||
resolve(tmp_addr_total_balance_output); |
|||
NProgress.done(); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
}); |
|||
} |
@ -1,776 +0,0 @@ |
|||
function EdexfillTxHistory(coin) { |
|||
$('#edexcoin_txhistory').data('panel-api').load(); |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'); |
|||
|
|||
if ( active_edexcoinmodecode === 'Basilisk' ) { |
|||
EdexGetTxList_cache(coin) |
|||
.then(function(result) { |
|||
var edex_txhistory_table = ''; |
|||
edex_txhistory_table = $('#edex-tx-history-tbl').DataTable({ |
|||
data: result, |
|||
'order': [ |
|||
[ 3, 'desc' ] |
|||
], |
|||
select: true, |
|||
retrieve: true |
|||
}); |
|||
|
|||
edex_txhistory_table.destroy(); |
|||
edex_txhistory_table = $('#edex-tx-history-tbl').DataTable({ |
|||
data: result, |
|||
'order': [ |
|||
[ 3, 'desc' ] |
|||
], |
|||
select: true, |
|||
retrieve: true |
|||
}); |
|||
$('#edexcoin_txhistory').data('panel-api').done(); |
|||
$('.panel-loading').remove(); |
|||
}); |
|||
} |
|||
|
|||
if ( active_edexcoinmodecode === 'Full' ) { |
|||
EdexGetTxList(coin) |
|||
.then(function(result){ |
|||
var edex_txhistory_table = ''; |
|||
edex_txhistory_table = $('#edex-tx-history-tbl').DataTable({ |
|||
data: result, |
|||
'order': [ |
|||
[ 3, 'desc' ] |
|||
], |
|||
select: true, |
|||
retrieve: true |
|||
}); |
|||
|
|||
edex_txhistory_table.destroy(); |
|||
edex_txhistory_table = $('#edex-tx-history-tbl').DataTable({ |
|||
data: result, |
|||
'order': [ |
|||
[ 3, 'desc' ] |
|||
], |
|||
select: true, |
|||
retrieve: true |
|||
}); |
|||
$('#edexcoin_txhistory').data('panel-api').done(); |
|||
$('.panel-loading').remove(); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
function refreshEDEXCoinWalletList() { |
|||
Dashboard.handleWalletWidgets(); |
|||
} |
|||
|
|||
function EdexGetTxList(coin) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data_2 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getaddressesbyaccount', |
|||
'account': '*' |
|||
}, |
|||
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'); |
|||
|
|||
$.ajax({ |
|||
data: JSON.stringify(ajax_data_2), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.then(data => { |
|||
var total_utxos = []; |
|||
let params = ''; |
|||
|
|||
Promise.all(data.result.map((coinaddr_value,coinaddr_index) => { |
|||
if ( active_edexcoinmodecode == 'Basilisk' ) { |
|||
params = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listtransactions', |
|||
'address': coinaddr_value, |
|||
'count': 100, |
|||
'skip': 0, |
|||
'symbol': coin |
|||
}; |
|||
} else { |
|||
params = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'method': 'listtransactions', |
|||
'params': [ |
|||
0, |
|||
9999999, |
|||
[] |
|||
] |
|||
}; |
|||
} |
|||
|
|||
return new Promise((resolve, reject) => { |
|||
$.ajax({ |
|||
data: JSON.stringify(params), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.then(data => { |
|||
if ( active_edexcoinmodecode == 'Full' ) { |
|||
data = data.result; |
|||
} |
|||
//console.log(data)
|
|||
total_utxos = $.merge(total_utxos, data); |
|||
resolve(total_utxos); |
|||
}); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
let result_data = result[result.length - 1]; |
|||
let compiled_result = []; |
|||
|
|||
$.each(result_data, function(index, value) { |
|||
if ( active_edexcoinmodecode == 'Full' || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'BTC') || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'BTCD' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'LTC' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'DOGE' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'DGB' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'SYS' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'MZC' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'UNO' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'ZET' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'BTM' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'CARB' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'ANC' ) || |
|||
( active_edexcoinmodecode == 'Basilisk' && coin == 'FRK' ) ) { |
|||
|
|||
var tmp_category = '', |
|||
tmp_amount = result_data[index].amount; |
|||
|
|||
if (!('amount' in result_data[index])) { |
|||
tmp_amount = '<span class="label label-dark">' + _lang[defaultLang].DASHBOARD.UNKNOWN + '</span>'; |
|||
} |
|||
|
|||
var tmp_addr = result_data[index].address; |
|||
if (!('address' in result_data[index])) { |
|||
tmp_addr = '<i class="icon fa-bullseye"></i> <span class="label label-dark">' + _lang[defaultLang].DASHBOARD.ZADDR_NOT_LISTED + '!</span>'; |
|||
} |
|||
|
|||
var tmp_secondsToString = secondsToString(result_data[index].blocktime); |
|||
|
|||
if ( result_data[index].category == 'send' ) { |
|||
tmp_category = '<i class="icon fa-arrow-circle-left"></i> ' + _lang[defaultLang].DASHBOARD.OUT; |
|||
} |
|||
if ( result_data[index].category == 'receive' ) { |
|||
tmp_category = '<i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN; |
|||
} |
|||
if ( result_data[index].category == 'generate' ) { |
|||
tmp_category = '<i class="icon fa-cogs"></i> ' + _lang[defaultLang].DASHBOARD.IMMATURE; |
|||
}if ( result_data[index].category == 'immature' ) { |
|||
tmp_category = '<i class="icon fa-clock-o"></i> ' + _lang[defaultLang].DASHBOARD.OUT; |
|||
} |
|||
if ( result_data[index].category == 'unknown' ) { |
|||
tmp_category = '<i class="icon fa-meh-o"></i> ' + _lang[defaultLang].DASHBOARD.UNKNOWN; |
|||
} |
|||
|
|||
tmplisttransactions = [ |
|||
tmp_category, |
|||
result_data[index].confirmations, |
|||
tmp_amount, |
|||
tmp_secondsToString, |
|||
tmp_addr, |
|||
'<button type="button" class="btn btn-xs white btn-info waves-effect waves-light kmd-txid-details-btn" data-edexcoin="' + coin + '" data-txidtype="public" data-txid="' + result_data[index].txid + '">' + |
|||
'<i class="icon fa-search"></i>' + |
|||
'</button>' |
|||
]; |
|||
compiled_result.push(tmplisttransactions); |
|||
} |
|||
|
|||
if ( active_edexcoinmodecode == 'Basilisk' && |
|||
coin !== 'BTC' && |
|||
coin !== 'BTCD' && |
|||
coin !== 'LTC' && |
|||
coin !== 'DOGE' && |
|||
coin !== 'DGB' && |
|||
coin !== 'SYS' && |
|||
coin !== 'MZC' && |
|||
coin !== 'UNO' && |
|||
coin !== 'ZET' && |
|||
coin !== 'BTM' && |
|||
coin !== 'CARB' && |
|||
coin !== 'ANC' && |
|||
coin !== 'FRK' && |
|||
coin !== 'GMC' ) { |
|||
var tmp_category = '', |
|||
tmp_amount = result_data[index].amount; |
|||
|
|||
if (!('amount' in result_data[index])) { |
|||
tmp_amount = '<span class="label label-dark">' + _lang[defaultLang].DASHBOARD.UNKNOWN + '</span>'; |
|||
} |
|||
|
|||
var tmp_addr = null; |
|||
if (!('paid' in result_data[index])) { |
|||
tmp_addr = '<i class="icon fa-bullseye"></i> <span class="label label-dark">' + _lang[defaultLang].DASHBOARD.ZADDR_NOT_LISTED + '!</span>'; |
|||
} |
|||
if (('paid' in result_data[index])) { |
|||
var first_addr = Object.keys(result_data[index].paid['vouts'][0]), |
|||
tmp_addr = first_addr[0]; |
|||
} |
|||
|
|||
var tmp_secondsToString = secondsToString(result_data[index].timestamp); |
|||
|
|||
if ( result_data[index].type == 'sent' ) { |
|||
tmp_category = '<span class="label label-danger">' + |
|||
'<i class="icon fa-arrow-circle-left"></i> ' + _lang[defaultLang].DASHBOARD.OUT + |
|||
'</span>'; |
|||
} |
|||
if ( result_data[index].type == 'received' ) { |
|||
tmp_category = '<span class="label label-success">' + |
|||
'<i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN + |
|||
'</span>'; |
|||
} |
|||
if ( result_data[index].type == 'generate' ) { |
|||
tmp_category = '<i class="icon fa-cogs"></i> ' + _lang[defaultLang].DASHBOARD.MINED; |
|||
} |
|||
if ( result_data[index].type == 'immature' ) { |
|||
tmp_category = '<i class="icon fa-clock-o"></i> ' + _lang[defaultLang].DASHBOARD.IMMATURE; |
|||
} |
|||
if ( result_data[index].type == 'unknown' ) { |
|||
tmp_category = '<i class="icon fa-meh-o"></i> ' + _lang[defaultLang].DASHBOARD.UNKNOWN; |
|||
} |
|||
|
|||
if (!('confirmations' in result_data[index])) { |
|||
tmp_confirms = '<i class="icon fa-meh-o"></i> ' + _lang[defaultLang].DASHBOARD.UNKNOWN; |
|||
} |
|||
if (('confirmations' in result_data[index])) { |
|||
tmp_confirms = result_data[index].confirmations; |
|||
} |
|||
|
|||
tmplisttransactions = [ |
|||
tmp_category, |
|||
tmp_confirms, |
|||
tmp_amount, |
|||
tmp_secondsToString, |
|||
tmp_addr, |
|||
'<button type="button" class="btn btn-xs white btn-info waves-effect waves-light kmd-txid-details-btn" data-edexcoin="' + coin + '" data-txidtype="public" data-txid="' + result_data[index].txid + '">' + |
|||
'<i class="icon fa-search"></i>' + |
|||
'</button>' |
|||
]; |
|||
compiled_result.push(tmplisttransactions); |
|||
} |
|||
}); |
|||
|
|||
resolve(compiled_result); |
|||
NProgress.done(); |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EdexGetTxList_cache(coin) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
return new Promise((resolve) => { |
|||
Shepherd_GetBasiliskCache() |
|||
.then(function(result) { |
|||
var _data = JSON.parse(result), |
|||
query = _data.result.basilisk, |
|||
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'), |
|||
total_utxos = []; |
|||
|
|||
Promise.all(query[coin].addresses.map((coinaddr_value, coinaddr_index) => { |
|||
return new Promise((resolve, reject) => { |
|||
var data = query[coin][coinaddr_value].listtransactions.data; |
|||
|
|||
total_utxos = $.merge(total_utxos, data); |
|||
resolve(total_utxos); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
let result_data = result[result.length - 1], |
|||
compiled_result = []; |
|||
|
|||
$.each(result_data, function(index, value) { |
|||
if ( active_edexcoinmodecode == 'Basilisk' && coin !== 'BTC' && coin !== 'SYS') { |
|||
var tmp_category = '', |
|||
tmp_amount = result_data[index].amount; |
|||
|
|||
if (!('amount' in result_data[index])) { |
|||
tmp_amount = '<span class="label label-dark">' + _lang[defaultLang].DASHBOARD.UNKNOWN + '</span>'; |
|||
} |
|||
|
|||
var tmp_addr = null; |
|||
if (!('paid' in result_data[index])) { |
|||
tmp_addr = '<i class="icon fa-bullseye"></i> <span class="label label-dark">' + _lang[defaultLang].DASHBOARD.ZADDR_NOT_LISTED + '!</span>'; |
|||
} |
|||
if (('paid' in result_data[index])) { |
|||
var first_addr = Object.keys(result_data[index].paid['vouts'][0]), |
|||
tmp_addr = first_addr[0]; |
|||
} |
|||
|
|||
var tmp_secondsToString = secondsToString(result_data[index].timestamp); |
|||
|
|||
if ( result_data[index].type == 'sent' ) { |
|||
tmp_category = '<span class="label label-danger">' + |
|||
'<i class="icon fa-arrow-circle-left"></i> ' + _lang[defaultLang].DASHBOARD.OUT + |
|||
'</span>'; |
|||
} |
|||
if ( result_data[index].type == 'received' ) { |
|||
tmp_category = '<span class="label label-success">' + |
|||
'<i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN + |
|||
'</span>'; |
|||
} |
|||
if ( result_data[index].type == 'generate' ) { |
|||
tmp_category = '<i class="icon fa-cogs"></i> ' + _lang[defaultLang].DASHBOARD.MINED; |
|||
} |
|||
if ( result_data[index].type == 'immature' ) { |
|||
tmp_category = '<i class="icon fa-clock-o"></i> ' + _lang[defaultLang].DASHBOARD.IMMATURE; |
|||
} |
|||
if ( result_data[index].type == 'unknown' ) { |
|||
tmp_category = '<i class="icon fa-meh-o"></i> ' + _lang[defaultLang].DASHBOARD.UNKNOWN; |
|||
} |
|||
|
|||
if (!('confirmations' in result_data[index])) { |
|||
tmp_confirms = '<i class="icon fa-meh-o"></i> ' + _lang[defaultLang].DASHBOARD.UNKNOWN; |
|||
} |
|||
if (('confirmations' in result_data[index])) { |
|||
tmp_confirms = result_data[index].confirmations; |
|||
} |
|||
|
|||
tmplisttransactions = [ |
|||
tmp_category, |
|||
tmp_confirms, |
|||
tmp_amount, |
|||
tmp_secondsToString, |
|||
tmp_addr, |
|||
'<button type="button" class="btn btn-xs white btn-info waves-effect waves-light kmd-txid-details-btn" data-edexcoin="' + coin + '" data-txidtype="public" data-txid="' + result_data[index].txid + '">' + |
|||
'<i class="icon fa-search"></i>' + |
|||
'</button>' |
|||
]; |
|||
compiled_result.push(tmplisttransactions); |
|||
} |
|||
}) |
|||
|
|||
resolve(compiled_result); |
|||
NProgress.done(); |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
|
|||
function clearEdexSendFieldData() { |
|||
} |
|||
|
|||
function EdexListAllAddr(coin) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'); |
|||
|
|||
if (active_edexcoinmodecode == 'Basilisk' && coin !== 'BTC' && coin !== 'SYS') { |
|||
EDEXgetaddrbyaccount_cache(coin) |
|||
.then(function(result) { |
|||
var only_reciving_addr_data = []; |
|||
|
|||
console.log(result); |
|||
$.each(result, function(index, value) { |
|||
if (value.interest == undefined || coin !== 'KMD') { |
|||
console.log('interest is undefined'); |
|||
tmp_interest = 'NA'; |
|||
} else { |
|||
tmp_interest = value.interest; |
|||
} |
|||
only_reciving_addr_data.push([ |
|||
value.label, |
|||
value.addr, |
|||
value.total, |
|||
tmp_interest |
|||
]); |
|||
}); |
|||
console.log(only_reciving_addr_data); |
|||
|
|||
var edexcoin_recieve_table = ''; |
|||
|
|||
edexcoin_recieve_table = $('#edexcoin-recieve-addr-tbl').DataTable({ |
|||
data: only_reciving_addr_data, |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
edexcoin_recieve_table.destroy(); |
|||
|
|||
edexcoin_recieve_table = $('#edexcoin-recieve-addr-tbl').DataTable({ |
|||
data: only_reciving_addr_data, |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
}); |
|||
} else if (active_edexcoinmodecode == 'Basilisk' ) { |
|||
EDEXgetaddrbyaccount(coin) |
|||
.then(function(result) { |
|||
var only_reciving_addr_data = []; |
|||
|
|||
console.log(result); |
|||
$.each(result, function(index, value) { |
|||
if (value.interest == undefined || coin !== 'KMD') { |
|||
console.log('interest is undefined'); |
|||
tmp_interest = 'NA'; |
|||
} else { |
|||
tmp_interest = value.interest; |
|||
} |
|||
only_reciving_addr_data.push([ |
|||
value.label, |
|||
value.addr, |
|||
value.total, |
|||
tmp_interest |
|||
]); |
|||
}); |
|||
console.log(only_reciving_addr_data); |
|||
|
|||
var edexcoin_recieve_table = ''; |
|||
|
|||
edexcoin_recieve_table = $('#edexcoin-recieve-addr-tbl').DataTable({ |
|||
data: only_reciving_addr_data, |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
edexcoin_recieve_table.destroy(); |
|||
|
|||
edexcoin_recieve_table = $('#edexcoin-recieve-addr-tbl').DataTable({ |
|||
data: only_reciving_addr_data, |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
}); |
|||
} |
|||
|
|||
if (active_edexcoinmodecode == 'Full') { |
|||
EDEXgetaddrbyaccount(coin) |
|||
.then(function(result) { |
|||
var only_reciving_addr_data = []; |
|||
|
|||
console.log(result); |
|||
$.each(result, function(index, value) { |
|||
if (value.interest == undefined || coin !== 'KMD') { |
|||
console.log('interest is undefined'); |
|||
tmp_interest = 'NA'; |
|||
} else { |
|||
tmp_interest = value.interest; |
|||
} |
|||
only_reciving_addr_data.push([ |
|||
value.label, |
|||
value.addr, |
|||
value.total, |
|||
tmp_interest |
|||
]); |
|||
}); |
|||
console.log(only_reciving_addr_data); |
|||
|
|||
var edexcoin_recieve_table = ''; |
|||
|
|||
edexcoin_recieve_table = $('#edexcoin-recieve-addr-tbl').DataTable({ |
|||
data: only_reciving_addr_data, |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
edexcoin_recieve_table.destroy(); |
|||
|
|||
edexcoin_recieve_table = $('#edexcoin-recieve-addr-tbl').DataTable({ |
|||
data: only_reciving_addr_data, |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
function edexCoinBtnAction() { |
|||
$('.edexcoin-logo').click(function() { |
|||
if ($(this).data('edexcoinmodecode') === 'Native') { |
|||
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active'); }); |
|||
} |
|||
$( '#edexcoin_send_coins_back_btn' ).trigger( 'click' ); |
|||
$('#btn_edexcoin_dashboard').hide(); |
|||
$( |
|||
'#btn_edexcoin_send,' + |
|||
'#btn_edexcoin_recieve' |
|||
) |
|||
.show(); |
|||
|
|||
var selected_coin = $(this).data('edexcoincode'), |
|||
selected_coinmode = $(this).data('edexcoinmodecode'), |
|||
selected_coinname = $(this).data('edexcoinname'); |
|||
|
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.hide(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-4' ) |
|||
.addClass( 'col-lg-12' ); |
|||
$( |
|||
'#edex_interest_balance,' + |
|||
'#edex_total_balance_interest,' + |
|||
'#edex_total_balance' |
|||
) |
|||
.text('-'); |
|||
$('#edex_total_balance_coincode').text(selected_coin); |
|||
|
|||
sessionStorage.setItem('edexTmpMode', selected_coinmode); // set edex mode
|
|||
resizeDashboardWindow(); |
|||
|
|||
if ( selected_coinmode == 'Basilisk' ) { |
|||
$('#btn_edexcoin_basilisk').show(); |
|||
$( |
|||
'#edex-footer,' + |
|||
'#edexcoin-wallet-waitingrt-alert' |
|||
) |
|||
.hide(); |
|||
sessionStorage.setItem('edexTmpRefresh', 'start'); |
|||
} |
|||
if ( selected_coinmode == 'Full' ) { |
|||
$('#edex-footer').show(); |
|||
$('#btn_edexcoin_basilisk').hide(); |
|||
sessionStorage.setItem('edexTmpRefresh', 'start'); |
|||
} |
|||
if ( selected_coinmode !== 'Native' ) { |
|||
$( |
|||
'#edexcoin_dashoard_section,' + |
|||
'#header-dashboard,' + |
|||
'#wallet-widgets,' + |
|||
'#edexcoin_dashboardinfo,' + |
|||
'#currency-progressbars' |
|||
) |
|||
.show(); |
|||
$( |
|||
'#no_wallet_selected,' + |
|||
'#edexcoin_send,' + |
|||
'#edexcoin_recieve_section,' + |
|||
'#edexcoin_settings' |
|||
) |
|||
.hide(); |
|||
|
|||
// get selected coin's code and populate in easydex wallet widget's html elements
|
|||
var coincode = $(this).data('edexcoincode'); |
|||
$.each($('[data-edexcoin]'), function(index, value) { |
|||
$('[data-edexcoin]').attr('data-edexcoin', coincode); |
|||
$('[data-edexcoin="' + coincode + '"]'); |
|||
}); |
|||
$.each($('[data-edexcoinmenu]'), function(index, value) { |
|||
$('[data-edexcoinmenu]').attr('data-edexcoinmenu', coincode); |
|||
$('[data-edexcoinmenu="' + coincode + '"]'); |
|||
}); |
|||
|
|||
$('#edexcoin-active').text(selected_coinname); |
|||
$('#edex_total_balance_coincode').text(coincode); |
|||
// populate selected coin's address
|
|||
EDEXMainAddr(selected_coin) |
|||
.then(function(result) { |
|||
$('#edexcoin_active_addr').text(result); |
|||
$('#edexcoin_active_addr_clipboard').attr('data-clipboard-text', result); |
|||
}); |
|||
|
|||
$('#edexcoin_active_addr_clipboard').click(function() { |
|||
alertify.success(_lang[defaultLang].DASHBOARD.ADDR_COPIED + '.'); |
|||
}); |
|||
|
|||
if (clipboard && clipboard != null ) { |
|||
clipboard.destroy(); |
|||
} |
|||
|
|||
var clipboard = new Clipboard('.clipboard-edexaddr'); |
|||
clipboard.on('success', function(e) { |
|||
console.info('Action: ', e.action); |
|||
console.info('Text: ', e.text); |
|||
console.info('Trigger: ', e.trigger); |
|||
|
|||
e.clearSelection(); |
|||
}); |
|||
|
|||
clipboard.on('error', function(e) { |
|||
console.error('Action: ', e.action); |
|||
console.error('Trigger: ', e.trigger); |
|||
}); |
|||
|
|||
// populate selected coin's balance
|
|||
if ( selected_coinmode == 'Basilisk' && |
|||
selected_coin !== 'BTC' && |
|||
selected_coin !== 'BTCD' && |
|||
selected_coin !== 'LTC' && |
|||
selected_coin !== 'DOGE' && |
|||
selected_coin !== 'DGB' && |
|||
selected_coin !== 'SYS' && |
|||
selected_coin !== 'MZC' && |
|||
selected_coin !== 'UNO' && |
|||
selected_coin !== 'ZET' && |
|||
selected_coin !== 'BTM' && |
|||
selected_coin !== 'CARB' && |
|||
selected_coin !== 'ANC' && |
|||
selected_coin !== 'FRK' && |
|||
selected_coin !== 'GMC') { |
|||
getDEXGetBalance_cache(selected_coin) |
|||
.then(function(result) { |
|||
if ( result.interest !== undefined && selected_coin == 'KMD') { |
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.show(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-12' ) |
|||
.addClass( 'col-lg-4' ); |
|||
$('#edex_interest_balance').text(result.interest); |
|||
$('#edex_total_balance_interest').text(result.totalbalance); |
|||
$('#edex_total_interest_coincode').text(selected_coin); |
|||
$('#edex_total_balance_interest_coincode').text(selected_coin); |
|||
} |
|||
|
|||
if ( result.interest === undefined || selected_coin !== 'KMD') { |
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.hide(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-4' ) |
|||
.addClass( 'col-lg-12' ); |
|||
$( |
|||
'#edex_interest_balance,' + |
|||
'#edex_total_balance_interest' |
|||
) |
|||
.text('-'); |
|||
} |
|||
|
|||
$('#edex_total_balance').text(result.total); |
|||
$('#edex_total_balance_coincode').text(selected_coin); |
|||
}); |
|||
} else if (selected_coinmode == 'Basilisk') { |
|||
getDEXGetBalance2(selected_coin) |
|||
.then(function(result) { |
|||
if ( result.interest !== undefined ) { |
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.show(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-12' ) |
|||
.addClass( 'col-lg-4' ); |
|||
$('#edex_interest_balance').text(result.interest); |
|||
$('#edex_total_balance_interest').text(result.totalbalance); |
|||
$('#edex_total_interest_coincode').text(selected_coin); |
|||
$('#edex_total_balance_interest_coincode').text(selected_coin); |
|||
} |
|||
|
|||
if ( result.interest === undefined || selected_coin !== 'KMD') { |
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.hide(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-4' ) |
|||
.addClass( 'col-lg-12' ); |
|||
$( |
|||
'#edex_interest_balance,' + |
|||
'#edex_total_balance_interest' |
|||
) |
|||
.text('-'); |
|||
} |
|||
|
|||
$('#edex_total_balance').text(result.total); |
|||
$('#edex_total_balance_coincode').text(selected_coin); |
|||
}); |
|||
} else { |
|||
EDEXlistunspent(selected_coin) |
|||
.then(function(result) { |
|||
if (result[0] != undefined) { |
|||
if ( result[0].interest !== undefined ) { |
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.show(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-12' ) |
|||
.addClass( 'col-lg-4' ); |
|||
$('#edex_interest_balance').text(result[0].interest); |
|||
$('#edex_total_balance_interest').text(result[0].totalbalance); |
|||
$('#edex_total_interest_coincode').text(selected_coin); |
|||
$('#edex_total_balance_interest_coincode').text(selected_coin); |
|||
} |
|||
|
|||
if ( result[0].interest === undefined ) { |
|||
$( |
|||
'#edexcoin_getbalance_interest,' + |
|||
'#edexcoin_getbalance_total_interest' |
|||
) |
|||
.hide(); |
|||
$('#edexcoin_getbalance_t') |
|||
.removeClass( 'col-lg-4' ) |
|||
.addClass( 'col-lg-12' ); |
|||
$( |
|||
'#edex_interest_balance,' + |
|||
'#edex_total_balance_interest' |
|||
) |
|||
.text('-'); |
|||
} |
|||
|
|||
$('#edex_total_balance').text(result[0].total); |
|||
$('#edex_total_balance_coincode').text(selected_coin); |
|||
} else { |
|||
$('#edex_total_balance').text('0'); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
EdexfillTxHistory(coincode); |
|||
} else { |
|||
$('#currency-progressbars').hide(); |
|||
if ( selected_coin == 'KMD' ) { |
|||
sessionStorage.setItem('edexTmpMode', selected_coinmode); |
|||
sessionStorage.setItem('edexTmpRefresh', 'start'); |
|||
$( '#nav-komodo-wallet' ).trigger( 'click' ); |
|||
} |
|||
if ( selected_coin == 'ZEC' ) { |
|||
sessionStorage.setItem('edexTmpMode', selected_coinmode); |
|||
sessionStorage.setItem('edexTmpRefresh', 'start'); |
|||
$( '#nav-zcash-wallet' ).trigger( 'click' ); |
|||
} |
|||
if (checkAC(selected_coin)) { |
|||
sessionStorage.setItem('edexTmpMode', selected_coinmode); |
|||
sessionStorage.setItem('edexTmpRefresh', 'start'); |
|||
assetchain_pax_menu_actions(selected_coin); |
|||
} |
|||
} |
|||
}); |
|||
} |
@ -1,264 +0,0 @@ |
|||
function IguanaAJAX(url, ajax_data) { |
|||
return $.ajax({ |
|||
data: JSON.stringify(ajax_data), |
|||
url: url, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
} |
|||
|
|||
function Iguana_dumpwallet() { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'dumpwallet', |
|||
'filename': '' |
|||
}; |
|||
|
|||
return_result = function () { |
|||
var tmp = null; |
|||
$.ajax({ |
|||
'async': false, |
|||
'type': 'POST', |
|||
'global': false, |
|||
'url': 'http://127.0.0.1:' + config.iguanaPort, |
|||
'data': JSON.stringify(ajax_data), |
|||
'success': function (data) { |
|||
tmp = data; |
|||
} |
|||
}); |
|||
|
|||
return tmp; |
|||
}(); |
|||
} |
|||
|
|||
function Iguana_ServiceUnavailable() { |
|||
console.log('Network Error api');_lang[defaultLang] |
|||
toastr.error(_lang[defaultLang].TOASTR.IGUANA_CONN_ERR_ALT, _lang[defaultLang].TOASTR.SERVICE_NOTIFICATION); |
|||
toastr.info(_lang[defaultLang].TOASTR.IGUANA_ARE_YOU_SURE, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
ClearOnLogout(true, true); |
|||
} |
|||
|
|||
function secondsToString(seconds) { |
|||
var a = new Date(seconds * 1000), |
|||
months = [ |
|||
'Jan', |
|||
'Feb', |
|||
'Mar', |
|||
'Apr', |
|||
'May', |
|||
'Jun', |
|||
'Jul', |
|||
'Aug', |
|||
'Sep', |
|||
'Oct', |
|||
'Nov', |
|||
'Dec' |
|||
], |
|||
year = a.getFullYear(), |
|||
month = months[a.getMonth()], |
|||
date = a.getDate(), |
|||
hour = a.getHours(), |
|||
min = a.getMinutes(), |
|||
sec = a.getSeconds(), |
|||
time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec; |
|||
|
|||
return time; |
|||
} |
|||
|
|||
function Iguana_HashHex(data) { |
|||
var result = '', |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'hash', |
|||
'method': 'hex', |
|||
'message': data |
|||
}; |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
result = AjaxOutputData.hex; |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function Iguana_SetRPCAuth() { |
|||
var tmpPass = '1234'; //md5(PassPhraseGenerator.generatePassPhrase(128));
|
|||
sessionStorage.setItem('IguanaRPCAuth', tmpPass); |
|||
} |
|||
|
|||
function Iguana_CheckActiveCoins() { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'InstantDEX', |
|||
'method': 'allcoins' |
|||
}, |
|||
AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
console.log(data); |
|||
var result = []; |
|||
|
|||
AjaxOutputData = JSON.parse(AjaxOutputData.responseText); |
|||
$.each(AjaxOutputData, function( index, value ) { |
|||
if ( index === 'tag' ) { |
|||
|
|||
} else { |
|||
if (AjaxOutputData[index].length !== 0 ) { |
|||
result.push({ 'active': AjaxOutputData[index].length }); |
|||
} |
|||
} |
|||
}); |
|||
|
|||
resolve(result); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}) |
|||
}); |
|||
} |
|||
|
|||
function Iguana_utxorawtx(data) { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'symbol': data.coin, |
|||
'agent': 'basilisk', |
|||
'method': 'utxorawtx', |
|||
'vals': { |
|||
'timelock': 0, |
|||
'changeaddr': data.sendfrom, |
|||
'destaddr': data.sendtoaddr, |
|||
'txfee': data.txfee, |
|||
'amount': data.amount, |
|||
'sendflag': data.sendsig |
|||
}, |
|||
'utxos': data.utxos |
|||
}; |
|||
|
|||
return new Promise((resolve) => { |
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.then(result => { |
|||
console.log(result); |
|||
resolve(result); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function checkAC(coinVal) { |
|||
if (coinVal == 'SUPERNET' || |
|||
coinVal == 'REVS' || |
|||
coinVal == 'WLC' || |
|||
coinVal == 'DEX' || |
|||
coinVal == 'PANGEA' || |
|||
coinVal == 'JUMBLR' || |
|||
coinVal == 'BET' || |
|||
coinVal == 'CRYPTO' || |
|||
coinVal == 'HODL' || |
|||
coinVal == 'SHARK' || |
|||
coinVal == 'BOTS' || |
|||
coinVal == 'MGW' || |
|||
coinVal == 'MVP' || |
|||
coinVal == 'KV' || |
|||
coinVal == 'CEAL' || |
|||
coinVal == 'MESH' || |
|||
coinVal == 'BTC' || |
|||
coinVal == 'USD' || |
|||
coinVal == 'RON' || |
|||
coinVal == 'EUR' || |
|||
coinVal == 'JPY' || |
|||
coinVal == 'GBP' || |
|||
coinVal == 'AUD' || |
|||
coinVal == 'CAD' || |
|||
coinVal == 'CHF' || |
|||
coinVal == 'NZD' || |
|||
coinVal == 'CNY' || |
|||
coinVal == 'RUB' || |
|||
coinVal == 'MXN' || |
|||
coinVal == 'BRL' || |
|||
coinVal == 'INR' || |
|||
coinVal == 'HKD' || |
|||
coinVal == 'TRY' || |
|||
coinVal == 'ZAR' || |
|||
coinVal == 'PLN' || |
|||
coinVal == 'NOK' || |
|||
coinVal == 'SEK' || |
|||
coinVal == 'DKK' || |
|||
coinVal == 'CZK' || |
|||
coinVal == 'HUF' || |
|||
coinVal == 'ILS' || |
|||
coinVal == 'KRW' || |
|||
coinVal == 'MYR' || |
|||
coinVal == 'PHP' || |
|||
coinVal == 'SGD' || |
|||
coinVal == 'THB' || |
|||
coinVal == 'BGN' || |
|||
coinVal == 'IDR' || |
|||
coinVal == 'HRK') { |
|||
return true; |
|||
} else { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
function formatBytes(bytes, decimals) { |
|||
if (bytes == 0) |
|||
return '0 Bytes'; |
|||
|
|||
var k = 1000, |
|||
dm = decimals + 1 || 3, |
|||
sizes = [ |
|||
'Bytes', |
|||
'KB', |
|||
'MB', |
|||
'GB', |
|||
'TB', |
|||
'PB', |
|||
'EB', |
|||
'ZB', |
|||
'YB' |
|||
], |
|||
i = Math.floor(Math.log(bytes) / Math.log(k)); |
|||
|
|||
return { |
|||
'ramsize': parseFloat((bytes / Math.pow(k, i)).toFixed(dm)), |
|||
'size': sizes[i] |
|||
}; |
|||
} |
File diff suppressed because it is too large
@ -1,549 +0,0 @@ |
|||
function Iguana_DEXgetNotaries(coin) { |
|||
var result = []; |
|||
|
|||
// Get parameters values from confirm dialog and send currency
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getnotaries', |
|||
'symbol': coin |
|||
}; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
|
|||
result.push(AjaxOutputData); |
|||
if (AjaxOutputData.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result[0]; |
|||
} |
|||
|
|||
function Iguana_DEXImportAddr(coin,addr) { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data_1 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'checkaddress', |
|||
'address': addr, |
|||
'symbol': coin |
|||
}; |
|||
|
|||
ajax_call_1 = $.ajax({ |
|||
data: JSON.stringify(ajax_data_1), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}); |
|||
|
|||
var ajax_call_2 = ajax_call_1.then(function(data) { |
|||
if (('error' in data)) { |
|||
var ajax_data_2 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'importaddress', |
|||
'address': addr, |
|||
'symbol': coin |
|||
}; |
|||
|
|||
return $.ajax({ |
|||
data: JSON.stringify(ajax_data_2), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}); |
|||
} else { |
|||
var tmp_result = 'already in list'; |
|||
return tmp_result; |
|||
} |
|||
}); |
|||
|
|||
ajax_call_2.done(function(data) { |
|||
console.log(data); |
|||
|
|||
if (data == 'already in list') { |
|||
toastr.info(coin + ' ' + _lang[defaultLang].TOASTR.ADDR_ALREADY_REG, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} else { |
|||
if (data.iswatchonly == true) { |
|||
toastr.success(_lang[defaultLang].TOASTR.REG + ' ' + coin + _lang[defaultLang].TOASTR.REG_ADDR, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
if (data.iswatchonly == false) { |
|||
toastr.success(coin + _lang[defaultLang].TOASTR.REG_ADDR_FAILED, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
if (data.iswatchonly == undefined) { |
|||
toastr.error(_lang[defaultLang].TOASTR.INVALID_QUERY + ' ' + coin + '. ' + _lang[defaultLang].TOASTR.TRY_AGAIN, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
if (data.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function Iguana_DEXImportAllWalletAddr(coin) { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data_2 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getaddressesbyaccount', |
|||
'account': '*' |
|||
}, |
|||
tmp_coin_addr = null, |
|||
ajax_call_2 = $.ajax({ |
|||
data: JSON.stringify(ajax_data_2), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}), |
|||
ajax_call_3 = ajax_call_2.then(function(data) { |
|||
$.each(data.result, function(coinaddr_index, coinaddr_value) { |
|||
console.log(coinaddr_index); |
|||
console.log(coinaddr_value); |
|||
|
|||
var ajax_data_4 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'checkaddress', |
|||
'address': coinaddr_value, |
|||
'symbol': coin |
|||
}; |
|||
ajax_call_4 = $.ajax({ |
|||
data: JSON.stringify(ajax_data_4), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json', |
|||
}); |
|||
var ajax_call_5 = ajax_call_4.then(function(data) { |
|||
console.log(data); |
|||
console.log(coinaddr_value); |
|||
|
|||
if (('error' in data) || !('address' in data)) { |
|||
var ajax_data_4 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'importaddress', |
|||
'address': coinaddr_value, |
|||
'symbol': coin |
|||
}; |
|||
|
|||
return $.ajax({ |
|||
data: JSON.stringify(ajax_data_4), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}); |
|||
} else { |
|||
var tmp_result = 'already in list'; |
|||
return tmp_result; |
|||
} |
|||
}); |
|||
|
|||
ajax_call_5.done(function(data) { |
|||
console.log(coin) |
|||
console.log(data); |
|||
|
|||
if (data == 'already in list') {_lang[defaultLang] |
|||
toastr.info(coinaddr_value + ' ' + _lang[defaultLang].TOASTR.ADDR_ALREADY_REG, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + coin); |
|||
} else { |
|||
if (data.iswatchonly == true) { |
|||
toastr.success(_lang[defaultLang].TOASTR.REG + ' ' + coinaddr_value + ' ' + _lang[defaultLang].TOASTR.REG_ADDR, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + coin); |
|||
} |
|||
if (data.iswatchonly == false) { |
|||
toastr.success(coinaddr_value + ' ' + _lang[defaultLang].TOASTR.REG_ADDR_FAILED, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + coin); |
|||
} |
|||
if (data.iswatchonly == undefined) { |
|||
toastr.error(_lang[defaultLang].TOASTR.INVALID_QUERY + ' ' + coinaddr_value + '. ' + _lang[defaultLang].TOASTR.TRY_AGAIN, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + coin); |
|||
} |
|||
if (data.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + coin); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Iguana_DEXImportAll() { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data_1 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'InstantDEX', |
|||
'method': 'allcoins' |
|||
}, |
|||
ajax_call_1 = $.ajax({ |
|||
data: JSON.stringify(ajax_data_1), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}); |
|||
|
|||
ajax_call_1.done(function(data) { |
|||
$.each([ |
|||
'basilisk', |
|||
'full' |
|||
], function(data_index, data_value) { |
|||
$.each(data[data_value], function(mode_index, mode_value) { |
|||
var ajax_data_2 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': mode_value, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getaddressesbyaccount', |
|||
'account': '*' |
|||
}, |
|||
tmp_coin_addr = null, |
|||
ajax_call_2 = $.ajax({ |
|||
data: JSON.stringify(ajax_data_2), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}), |
|||
ajax_call_3 = ajax_call_2.then(function(data) { |
|||
$.each(data.result, function(coinaddr_index, coinaddr_value) { |
|||
console.log(coinaddr_index); |
|||
console.log(coinaddr_value); |
|||
|
|||
var ajax_data_4 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'checkaddress', |
|||
'address': coinaddr_value, |
|||
'symbol': mode_value |
|||
}, |
|||
ajax_call_4 = $.ajax({ |
|||
data: JSON.stringify(ajax_data_4), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}), |
|||
ajax_call_5 = ajax_call_4.then(function(data) { |
|||
console.log(data); |
|||
console.log(coinaddr_value); |
|||
|
|||
if (('error' in data) || !('address' in data)) { |
|||
var ajax_data_4 = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'importaddress', |
|||
'address': coinaddr_value, |
|||
'symbol': mode_value |
|||
}; |
|||
|
|||
return $.ajax({ |
|||
data: JSON.stringify(ajax_data_4), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json', |
|||
}); |
|||
} else { |
|||
var tmp_result = 'already in list'; |
|||
return tmp_result; |
|||
} |
|||
}); |
|||
|
|||
ajax_call_5.done(function(data) { |
|||
console.log(mode_value); |
|||
console.log(data); |
|||
|
|||
if (data == 'already in list') { |
|||
toastr.info(coinaddr_value + _lang[defaultLang].TOASTR.ADDR_ALREADY_REG, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + mode_value); |
|||
} else { |
|||
if (data.iswatchonly == true) { |
|||
toastr.success(_lang[defaultLang].TOASTR.REG + ' ' + coinaddr_value + ' ' + _lang[defaultLang].TOASTR.REG_ADDR, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + mode_value); |
|||
} |
|||
if (data.iswatchonly == false) { |
|||
toastr.success(coinaddr_value + ' ' + _lang[defaultLang].TOASTR.REG_ADDR_FAILED, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + mode_value); |
|||
} |
|||
if (data.iswatchonly == undefined) { |
|||
toastr.error(_lang[defaultLang].TOASTR.INVALID_QUERY + ' ' + coinaddr_value + '. ' + _lang[defaultLang].TOASTR.TRY_AGAIN, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + mode_value); |
|||
} |
|||
if (data.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION + ' - ' + mode_value); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
}); |
|||
|
|||
ajax_call_3.done(function() { |
|||
console.log('Registered addresses from all active coin wallets.'); |
|||
}); |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Iguana_DEXCheckAddr(coin,addr) { |
|||
var result = []; |
|||
|
|||
// Get parameters values from confirm dialog and send currency
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'checkaddress', |
|||
'address': addr, |
|||
'symbol': coin |
|||
}; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
result.push(AjaxOutputData); |
|||
|
|||
if (AjaxOutputData.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function Iguana_DEXValidateAddr(coin, addr) { |
|||
var result = []; |
|||
|
|||
// Get parameters values from confirm dialog and send currency
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'validateaddress', |
|||
'address': addr, |
|||
'symbol': coin |
|||
}; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
|
|||
if (AjaxOutputData.iswatchonly == true) { |
|||
toastr.success(_lang[defaultLang].TOASTR.VALIDATION_SUCCESS, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
if (AjaxOutputData.iswatchonly == false) { |
|||
toastr.info(_lang[defaultLang].TOASTR.ADDR_ISNT_REG, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
if (AjaxOutputData.iswatchonly == undefined) { |
|||
toastr.error(_lang[defaultLang].TOASTR.INVALID_QUERY_ALT, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
result.push(AjaxOutputData); |
|||
if (AjaxOutputData.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function Iguana_DEXsendrawtx(data) { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'sendrawtransaction', |
|||
'signedtx': data.signedtx, |
|||
'symbol': data.coin |
|||
}; |
|||
|
|||
return new Promise((resolve) => { |
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST' |
|||
}) |
|||
.then(result => { |
|||
console.log(result); |
|||
resolve(result); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEX_DEXlistunspent(coin, addr) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listunspent', |
|||
'address': addr, |
|||
'symbol': coin |
|||
}, |
|||
AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
AjaxOutputData = JSON.parse(AjaxOutputData.responseText) |
|||
|
|||
if (AjaxOutputData == '' ) { |
|||
result.push([{ 'amount': 0 }]); |
|||
} |
|||
if (AjaxOutputData.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
resolve(AjaxOutputData); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
}); |
|||
} |
|||
|
|||
function EDEX_DEXnotarychains() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var result = [], |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dpow', |
|||
'method': 'notarychains' |
|||
}; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); // Ajax output gets the whole list of unspent coin with addresses
|
|||
console.log('== EDEX_DEXnotarychains Data OutPut =='); |
|||
result.push(AjaxOutputData); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return result[0]; |
|||
} |
|||
|
|||
function EDEX_DEXgetinfoAll() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var result = [], |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dpow', |
|||
'method': 'notarychains' |
|||
}, |
|||
get_dex_notarychains = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
get_dex_notarychains = JSON.parse(get_dex_notarychains.responseText); |
|||
|
|||
var refresh_percent = ''; |
|||
|
|||
$.each(get_dex_notarychains, function( coin_index, coin_value ) { |
|||
console.log(coin_index + ': ' + coin_value); |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getinfo', |
|||
'symbol': coin_value |
|||
}; |
|||
console.log(ajax_data); |
|||
|
|||
if (coin_value !== 'MESH') { |
|||
var getinfo_each_chain = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
getinfo_each_chain = JSON.parse(getinfo_each_chain.responseText); |
|||
console.log('== EDEX_DEXgetinfoAll Data OutPut =='); |
|||
console.log(getinfo_each_chain); |
|||
|
|||
var tmp_index = parseInt(coin_index) + 1, |
|||
refresh_percent = parseFloat(parseInt(coin_index, 10) * 100) / parseInt(get_dex_notarychains.length, 10); |
|||
|
|||
console.log(refresh_percent); |
|||
$('#basilisk-connections-refresh-title').text(_lang[defaultLang].IAPI.CON_STATUS + '... ' + tmp_index + '/' + get_dex_notarychains.length + ': ' + coin_value); |
|||
$('#basilisk-connections-refresh-percent').text(refresh_percent + '%'); |
|||
$('#basilisk-connections-refresh-progress-bar').width(refresh_percent + '%'); |
|||
|
|||
if (getinfo_each_chain == '' ) { |
|||
result.push([{ 'amount': 0 }]); |
|||
} |
|||
result.push(getinfo_each_chain); |
|||
if (getinfo_each_chain.error === 'less than required responses') { |
|||
toastr.info(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ_FOR + ' ' + coin_value + '.', _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
$('#basilisk-connections-refresh-status-output').text('Output: ' + getinfo_each_chain.error); |
|||
} else { |
|||
$('#basilisk-connections-refresh-status-output').text('Output: Connected'); |
|||
} |
|||
if ( tmp_index == get_dex_notarychains.length-1 ) { |
|||
$('#basilisk-connections-refresh-progress-bar').width('100%'); |
|||
$('#RefreshBasiliskConnectionsMdl').modal('hide'); |
|||
toastr.success(_lang[defaultLang].TOASTR.BASILISK_CON_REFRESHED + '.', _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return result[0]; |
|||
} |
@ -1,968 +0,0 @@ |
|||
function EDEXlistunspent(coin, addr) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (addr == undefined) { |
|||
addr = ''; |
|||
|
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'method': 'listunspent', |
|||
'params': [ |
|||
1, |
|||
9999999, |
|||
[] |
|||
] |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'method': 'listunspent', |
|||
'params': [ |
|||
1, |
|||
9999999, |
|||
[addr] |
|||
] |
|||
}; |
|||
} |
|||
|
|||
var active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'), |
|||
ajaxCall = $.ajax({ |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}); |
|||
|
|||
ajaxCall.done(function(data) { |
|||
var result = []; |
|||
|
|||
// This code using undscore.js takes only the address into an array which are unique in that list
|
|||
var unique_addresses = _.keys(_.countBy(data, function(data) { return data.address; })); |
|||
|
|||
// This function calls each unique address and calculates the total amount of coins in it.
|
|||
$.each(unique_addresses, function(index) { |
|||
var unique_addr_tmp_array = _.where(data, { address: unique_addresses[index] }), |
|||
tmpcalcnum = 0, |
|||
tmpcalcinterest = 0, |
|||
interest_enable = false, |
|||
tmptotalbalance = 0; |
|||
|
|||
$.each(data, function(index) { |
|||
if ( data[index].interest !== undefined ) { |
|||
tmpcalcnum = tmpcalcnum + data[index].amount; |
|||
tmpcalcinterest = tmpcalcinterest + data[index].interest; |
|||
interest_enable = true; |
|||
} |
|||
if ( data[index].interest === undefined ) { |
|||
tmpcalcnum = tmpcalcnum + data[index].amount; |
|||
} |
|||
}); |
|||
|
|||
if ( coin == 'KMD' ) { |
|||
tmptotalbalance = parseFloat(tmpcalcnum) + parseFloat(tmpcalcinterest); |
|||
var tmp_addr_total_balance_output = { |
|||
'addr': unique_addr_tmp_array[0].address, |
|||
'total': tmpcalcnum.toFixed(8), |
|||
'interest': tmpcalcinterest.toFixed(8), |
|||
'totalbalance': tmptotalbalance.toFixed(8) |
|||
}; |
|||
} |
|||
if ( coin !== 'KMD' ) { |
|||
var tmp_addr_total_balance_output = { |
|||
'addr': unique_addr_tmp_array[0].address, |
|||
'total': tmpcalcnum.toFixed(8) |
|||
}; |
|||
} |
|||
|
|||
result.push(tmp_addr_total_balance_output); |
|||
}); |
|||
|
|||
resolve(result); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
} |
|||
|
|||
function clearEdexSendFieldData() { |
|||
$('.showedexcoinaddrs').selectpicker('refresh'); |
|||
$( |
|||
'#edexcoin_sendto,' + |
|||
'#edexcoin_amount' |
|||
) |
|||
.val(''); |
|||
$('#edexcoin_total_value').text(''); |
|||
} |
|||
|
|||
function EDEXMainAddr(coin) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'activehandle' |
|||
}; |
|||
|
|||
var ajaxCall = $.ajax({ |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}); |
|||
|
|||
ajaxCall.done(function(data) { |
|||
tmp_coin_addr = data[coin]; |
|||
resolve(tmp_coin_addr); |
|||
NProgress.done(); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
NProgress.done(); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEXgetBalance(coin) { |
|||
// comment
|
|||
var result = [], |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getbalance', |
|||
'coin': coin |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
result.push(AjaxOutputData['result']); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function EDEXSendutxoRawTx(data) { |
|||
Shepherd_GetBasiliskCache().then(function(result) { |
|||
var _data = JSON.parse(result), |
|||
query = _data.result.basilisk, |
|||
utxos_set = query[data.coin][data.sendfrom].refresh.data, |
|||
send_data = { |
|||
'coin': data.coin, |
|||
'sendfrom': data.sendfrom, |
|||
'sendtoaddr': data.sendtoaddr, |
|||
'amount': data.amount, |
|||
'txfee': data.txfee, |
|||
'sendsig': (data.sendsig == true ? 0 : 1 ), |
|||
'utxos': utxos_set |
|||
}; |
|||
|
|||
console.log(send_data); |
|||
Iguana_utxorawtx(send_data).then(function(result) { |
|||
var edexcoin_sendto_result_tbl = ''; |
|||
|
|||
console.log(result); |
|||
|
|||
if (result.result == 'success' && result.completed == true) { |
|||
console.log(send_data); |
|||
toastr.success(_lang[defaultLang].TOASTR.SIGNED_TX_GENERATED + '.', _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
if (send_data.sendsig == 1) { |
|||
console.log(send_data); |
|||
toastr.info(_lang[defaultLang].TOASTR.SENDING_TX + '.', _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
ajax_data_dexrawtx = { |
|||
'signedtx': result.signedtx, |
|||
'coin': send_data.coin |
|||
}; |
|||
Iguana_DEXsendrawtx(ajax_data_dexrawtx).then(function(dexrwatx_result) { |
|||
console.log(dexrwatx_result); |
|||
if (dexrwatx_result.error == undefined) { |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|||
|
|||
toastr.success(_lang[defaultLang].TOASTR.SIGNED_TX_SENT, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
edexcoin_sendto_result_tbl += '<tr class="">' + |
|||
'<td>result</td>' + |
|||
'<td>' + |
|||
'<span class="label label-success">' + result.result + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>completed</td>' + |
|||
'<td>' + |
|||
'<span class="label label-primary">' + result.completed + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>rawtx</td>' + |
|||
'<td>' + |
|||
'<span style="display: block; width: 400px;word-wrap: break-word;">' + result.rawtx + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr>' + |
|||
'<td>txid</td>' + |
|||
'<td>' + |
|||
'<a href="javascript:void(0)" data-edexcoin="' + active_edexcoin + '" data-sendtotxresult="' + dexrwatx_result + '" class="edexcoin_sendto_output_result">' + dexrwatx_result + '</a>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>signedtx</td>' + |
|||
'<td>' + |
|||
'<span style="display: block; width: 400px;word-wrap: break-word;">' + result.signedtx + '</span>' + |
|||
'</td>' + |
|||
'</tr>'; |
|||
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl); |
|||
$('#edexcoin_send_coins_anothertx_btn').show(); |
|||
$('#edexcoin-send-txdetails-screen').data('panel-api').done(); |
|||
|
|||
var gettxiddata = function() { |
|||
return new Promise(function(resolve, reject) { |
|||
toastr.info(_lang[defaultLang].TOASTR.GETTING_TXID_INFO + '.', _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
|
|||
EDEXgettransaction(ajax_data_dexrawtx.coin,dexrwatx_result).then(function(result) { |
|||
console.log(result); |
|||
resolve(result); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
var process_refresh_utxos = function(gettxdata) { |
|||
return new Promise(function(resolve, reject) { |
|||
console.log(gettxdata); |
|||
console.log(utxos_set); |
|||
EDEX_GetTxIDList(gettxdata).then(function(get_txid_list) { |
|||
console.log(get_txid_list); |
|||
resolve(get_txid_list); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
var get_data_cache_contents = function(get_txid_list) { |
|||
return new Promise(function(resolve, reject) { |
|||
console.log(get_txid_list); |
|||
console.log(send_data); |
|||
console.log(send_data.sendfrom); |
|||
|
|||
Shepherd_GroomData_Get().then(function(result) { |
|||
console.log(result); |
|||
var save_this_data = EDEX_RemoveTXID(result, get_txid_list); |
|||
console.log(save_this_data); |
|||
resolve(save_this_data); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
var save_new_cache_data = function(save_this_data) { |
|||
return new Promise(function(resolve, reject) { |
|||
console.log(save_this_data); |
|||
|
|||
Shepherd_GroomData_Post(save_this_data).then(function(result) { |
|||
console.log(result); |
|||
resolve(result); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
gettxiddata() |
|||
.then(function(gettxdata) { |
|||
return process_refresh_utxos(gettxdata); |
|||
}) |
|||
.then(function(new_utxos_set) { |
|||
return get_data_cache_contents(new_utxos_set); |
|||
}) |
|||
.then(function(save_this_data) { |
|||
return save_new_cache_data(save_this_data); |
|||
}); |
|||
|
|||
//var call_data = {"allcoins": false,"coin":ajax_data_dexrawtx.coin,"calls":"refresh"}
|
|||
//console.log(call_data)
|
|||
/*Shepherd_FetchBasiliskData(call_data).then(function(result){ |
|||
console.log(result) |
|||
toastr.info('Refreshing Wallet Funds.', 'Wallet Notification'); |
|||
})*/ |
|||
} else { |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|||
|
|||
toastr.success(_lang[defaultLang].TOASTR.SIGNED_TX_SENT, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
edexcoin_sendto_result_tbl += '<tr class="">' + |
|||
'<td>result</td>' + |
|||
'<td>' + |
|||
'<span class="label label-dark">' + dexrwatx_result.result + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>error</td>' + |
|||
'<td>' + |
|||
'<span class="label label-danger">' + dexrwatx_result.error + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>signedtx</td>' + |
|||
'<td>' + |
|||
'<span style="display: block; width: 400px; word-wrap: break-word">' + ajax_data_dexrawtx.signedtx + '</span>' + |
|||
'</td>' + |
|||
'</tr>'; |
|||
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl); |
|||
$('#edexcoin_send_coins_anothertx_btn').show(); |
|||
$('#edexcoin-send-txdetails-screen').data('panel-api').done(); |
|||
|
|||
var call_data = { |
|||
'allcoins': false, |
|||
'coin': 'KMD', |
|||
'calls': 'refresh' |
|||
}; |
|||
console.log(call_data); |
|||
|
|||
Shepherd_FetchBasiliskData(call_data) |
|||
.then(function(result) { |
|||
console.log(result); |
|||
toastr.info(_lang[defaultLang].TOASTR.REFRESHING_FUNDS + '.', _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
if (send_data.sendsig == 0) { |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|||
|
|||
console.log(send_data); |
|||
edexcoin_sendto_result_tbl += '<tr class="">' + |
|||
'<td>result</td>' + |
|||
'<td>' + |
|||
'<span class="label label-success">' + result.result + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>completed</td>' + |
|||
'<td>' + |
|||
'<span class="label label-primary">' + result.completed + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>rawtx</td>' + |
|||
'<td>' + |
|||
'<span style="display: block; width: 400px; word-wrap: break-word">' + result.rawtx + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr>' + |
|||
'<td>txid</td>' + |
|||
'<td>' + |
|||
'<a href="javascript:void(0)" data-edexcoin="' + active_edexcoin + '" data-sendtotxresult="' + result.txid + '" class="edexcoin_sendto_output_result">' + result.txid + '</a>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>signedtx</td>' + |
|||
'<td>' + |
|||
'<span style="display: block; width: 400px; word-wrap: break-word">' + result.signedtx + '</span>' + |
|||
'</td>' + |
|||
'</tr>'; |
|||
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl); |
|||
$('#edexcoin_send_coins_anothertx_btn').show(); |
|||
$('#edexcoin-send-txdetails-screen').data('panel-api').done(); |
|||
|
|||
var call_data = { |
|||
'allcoins': false, |
|||
'coin': 'KMD', |
|||
'calls': 'refresh' |
|||
}; |
|||
console.log(call_data); |
|||
|
|||
Shepherd_FetchBasiliskData(call_data) |
|||
.then(function(result) { |
|||
console.log(result); |
|||
toastr.info(_lang[defaultLang].TOASTR.REFRESHING_FUNDS, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
}); |
|||
} |
|||
} else if (result.result == 'success' && result.completed == false) { |
|||
console.log(result); |
|||
toastr.error(_lang[defaultLang].TOASTR.SIGNED_TX_GENERATED_FAIL + '.', _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
|
|||
edexcoin_sendto_result_tbl += '<tr class="">' + |
|||
'<td>result</td>' + |
|||
'<td>' + |
|||
'<span class="label label-success">' + result.result + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>completed</td>' + |
|||
'<td>' + |
|||
'<span class="label label-primary">' + result.completed + '</span>' + |
|||
'</td>' + |
|||
'</tr>'; |
|||
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl); |
|||
$('#edexcoin_send_coins_anothertx_btn').show(); |
|||
$('#edexcoin-send-txdetails-screen').data('panel-api').done(); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEXSendToAddr(data) { |
|||
var result = [], |
|||
confirm_coinname_to_send = data.coin, |
|||
confirm_send_amount = data.amount, |
|||
confirm_sendto_address = data.sendtoaddr; |
|||
|
|||
// Get parameters values from confirm dialog and send currency
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
sendtoaddrvalues = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': confirm_coinname_to_send, |
|||
'method': 'sendtoaddress', |
|||
'params': [ |
|||
confirm_sendto_address, |
|||
confirm_send_amount, |
|||
'EasyDEX', |
|||
'EasyDEXTransaction' |
|||
] |
|||
}; |
|||
|
|||
console.log(sendtoaddrvalues); |
|||
console.log(sendtoaddrvalues.params); |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(sendtoaddrvalues), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var SendToAddrData = JSON.parse(data), |
|||
edexcoin_sendto_result_tbl = ''; |
|||
|
|||
result.push(SendToAddrData); |
|||
|
|||
if ( SendToAddrData.error !== undefined ) { |
|||
toastr.error(_lang[defaultLang].TOASTR.TX_FAILED, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
edexcoin_sendto_result_tbl += '<tr class="active">' + |
|||
'<td>error</td>' + |
|||
'<td>' + |
|||
'<span class="label label-danger">' + SendToAddrData.error + '</span>' + |
|||
'</td>' + |
|||
'</tr>'; |
|||
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl); |
|||
$('#edexcoin_send_coins_anothertx_btn').show(); |
|||
} |
|||
|
|||
if ( SendToAddrData.complete !== undefined ) { |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|||
|
|||
toastr.success(_lang[defaultLang].TOASTR.TX_SENT_ALT, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
edexcoin_sendto_result_tbl += '<tr class="">' + |
|||
'<td>complete</td>' + |
|||
'<td>' + |
|||
'<span class="label label-info">' + SendToAddrData.complete + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr>' + |
|||
'<td>result</td>' + |
|||
'<td>' + |
|||
'<a href="javascript:void(0)" data-edexcoin="' + active_edexcoin + '" data-sendtotxresult="' + SendToAddrData.result + '" class="edexcoin_sendto_output_result">' + SendToAddrData.result + '</a>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>sendrawtransaction</td>' + |
|||
'<td>' + |
|||
'<span class="label label-primary">' + SendToAddrData.sendrawtransaction + '</span>' + |
|||
'</td>' + |
|||
'</tr>' + |
|||
'<tr class="">' + |
|||
'<td>signedtx</td>' + |
|||
'<td>' + |
|||
'<span style="display: block; width: 400px;word-wrap: break-word;">' + SendToAddrData.signedtx + '</span>' + |
|||
'</td>' + |
|||
'</tr>'; |
|||
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl); |
|||
$('#edexcoin_send_coins_anothertx_btn').show(); |
|||
$('#edexcoin-send-txdetails-screen').data('panel-api').done(); |
|||
} |
|||
|
|||
var selected_coinmode = sessionStorage.getItem('edexTmpMode'); |
|||
if ( selected_coinmode == 'Basilisk' ) { |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|||
|
|||
getDEXGetBalance(active_edexcoin) |
|||
.then(function(result) { |
|||
$('#edex_total_balance').text(result.total); |
|||
}); |
|||
} else { |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'), |
|||
tmp_get_coin_balance = EDEXlistunspent(active_edexcoin); |
|||
|
|||
if (tmp_get_coin_balance[0] != undefined) { |
|||
$('#edex_total_balance').text(tmp_get_coin_balance[0].total.toFixed(8)); |
|||
} else { |
|||
$('#edex_total_balance').text('0'); |
|||
} |
|||
} |
|||
|
|||
$('#edexcoin_send_coins_btn').prop('disabled', false); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
$('#edexcoin-send-txdetails-screen').data('panel-api').done(); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function EDEXgetinfo(coin) { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getinfo', |
|||
'immediate': 100, |
|||
'timeout': 4000 |
|||
}, |
|||
AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
AjaxOutputData = JSON.parse(AjaxOutputData.responseText); |
|||
resolve(AjaxOutputData); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEXgettransaction(coin,txid) { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'symbol': coin, |
|||
'agent': 'dex', |
|||
'method': 'gettransaction', |
|||
'vout': 1, |
|||
'txid': txid |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort |
|||
}) |
|||
.then(function(data) { |
|||
res_data = JSON.parse(data); |
|||
resolve(res_data); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEXgetaddrbyaccount_cache(coin) { |
|||
return new Promise((resolve) => { |
|||
Shepherd_GetBasiliskCache() |
|||
.then(function(result) { |
|||
var _data = JSON.parse(result), |
|||
query = _data.result.basilisk, |
|||
tmp_addr_label = '<span class="label label-default">' + |
|||
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].IAPI.PUBLIC_SM + |
|||
'</span>', |
|||
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'); |
|||
|
|||
Promise.all(query[coin].addresses.map((coinaddr_value, coinaddr_index) => { |
|||
return new Promise((resolve, reject) => { |
|||
coinaddr_balances = query[coin][coinaddr_value].getbalance.data; |
|||
|
|||
if (coinaddr_balances.interest !== undefined) { |
|||
var pass_data = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': coinaddr_balances.balance.toFixed(8), |
|||
'interest': coinaddr_balances.interest.toFixed(8) |
|||
}; |
|||
} |
|||
if (coinaddr_balances.interest == undefined) { |
|||
var pass_data = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': coinaddr_balances.balance.toFixed(8) |
|||
}; |
|||
} |
|||
|
|||
resolve(pass_data); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
resolve(result); |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEXgetaddrbyaccount(coin) { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getaddressesbyaccount', |
|||
'account': '*' |
|||
}, |
|||
tmp_addr_label = '<span class="label label-default">' + |
|||
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].IAPI.PUBLIC_SM + |
|||
'</span>'; |
|||
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'); |
|||
|
|||
var AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
data = JSON.parse(AjaxOutputData.responseText); |
|||
console.log(data); |
|||
|
|||
if (active_edexcoinmodecode == 'Basilisk' && |
|||
coin !== 'BTC' && |
|||
coin !== 'BTCD' && |
|||
coin !== 'LTC' && |
|||
coin !== 'DOGE' && |
|||
coin !== 'DGB' && |
|||
coin !== 'SYS' && |
|||
coin !== 'MZC' && |
|||
coin !== 'UNO' && |
|||
coin !== 'ZET' && |
|||
coin !== 'BTM' && |
|||
coin !== 'CARB' && |
|||
coin !== 'ANC' && |
|||
coin !== 'FRK' ) { |
|||
Promise.all(data.result.map((coinaddr_value, coinaddr_index) => { |
|||
let params = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'getbalance', |
|||
'address': coinaddr_value, |
|||
'symbol': coin |
|||
}; |
|||
|
|||
console.log(params); |
|||
return new Promise((resolve, reject) => { |
|||
$.ajax({ |
|||
data: JSON.stringify(params), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.then(data => { |
|||
if (data.interest !== undefined) { |
|||
var pass_data = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': data.balance.toFixed(8), |
|||
'interest': data.interest.toFixed(8) |
|||
}; |
|||
} |
|||
if (data.interest == undefined) { |
|||
var pass_data = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': data.balance.toFixed(8) |
|||
}; |
|||
} |
|||
|
|||
resolve(pass_data); |
|||
}); |
|||
}); |
|||
|
|||
})) |
|||
.then(result => { |
|||
resolve(result); |
|||
NProgress.done(); |
|||
}); |
|||
} else if (active_edexcoinmodecode == 'Basilisk' ) { |
|||
Promise.all(data.result.map((coinaddr_value, coinaddr_index) => { |
|||
let params = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'dex', |
|||
'method': 'listunspent', |
|||
'address': coinaddr_value, |
|||
'symbol': coin |
|||
}; |
|||
|
|||
console.log(params); |
|||
return new Promise((resolve, reject) => { |
|||
$.ajax({ |
|||
data: JSON.stringify(params), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.then(data => { |
|||
console.log(coinaddr_value); |
|||
console.log(data); |
|||
|
|||
if (data.error === 'less than required responses') { |
|||
toastr.error(_lang[defaultLang].TOASTR.LESS_RESPONSES_REQ, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION); |
|||
} |
|||
|
|||
var tmpcalcnum = 0; |
|||
$.each(data, function(index) { |
|||
tmpcalcnum = tmpcalcnum + data[index].amount; |
|||
}); |
|||
|
|||
var tmp_addr_total_balance_output = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': tmpcalcnum.toFixed(8) |
|||
}; |
|||
console.log(tmp_addr_total_balance_output); |
|||
|
|||
if (data == '') { |
|||
tmp_addr_total_balance_output = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': 0 |
|||
}; |
|||
} |
|||
|
|||
resolve(tmp_addr_total_balance_output); |
|||
}); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
resolve(result); |
|||
NProgress.done(); |
|||
}); |
|||
} |
|||
|
|||
if (active_edexcoinmodecode == 'Full' && |
|||
coin !== 'BTC' && |
|||
coin !== 'BTCD' && |
|||
coin !== 'LTC' && |
|||
coin !== 'DOGE' && |
|||
coin !== 'DGB' && |
|||
coin !== 'SYS' && |
|||
coin !== 'MZC' && |
|||
coin !== 'UNO' && |
|||
coin !== 'ZET' && |
|||
coin !== 'BTM' && |
|||
coin !== 'CARB' && |
|||
coin !== 'ANC' && |
|||
coin !== 'FRK' ) { |
|||
Promise.all(data.result.map((coinaddr_value, coinaddr_index) => { |
|||
return new Promise((resolve, reject) => { |
|||
EDEXlistunspent(coin, coinaddr_value) |
|||
.then(function(data) { |
|||
var pass_data; |
|||
console.log(data); |
|||
|
|||
if (data.length !== 0) { |
|||
if (data[0].interest !== undefined) { |
|||
pass_data = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': data[0].total, |
|||
'interest': data[0].interest |
|||
}; |
|||
} |
|||
if (data[0].interest == undefined) { |
|||
pass_data = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': data[0].total |
|||
}; |
|||
} |
|||
} else { |
|||
pass_data = { |
|||
'label': tmp_addr_label, |
|||
'addr': coinaddr_value, |
|||
'total': 0.00000000 |
|||
}; |
|||
} |
|||
|
|||
console.log(pass_data); |
|||
resolve(pass_data); |
|||
}); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
console.log(result); |
|||
resolve(result); |
|||
NProgress.done(); |
|||
}); |
|||
} |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEXgetnewaddress(coin) { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'coin': coin, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'getnewaddress', |
|||
'account': '' |
|||
}, |
|||
AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
AjaxOutputData = JSON.parse(AjaxOutputData.responseText); |
|||
resolve(AjaxOutputData.result); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEXimportprivkey(params_data) { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'method': 'importprivkey', |
|||
'params': [ |
|||
params_data, |
|||
'imported' |
|||
] |
|||
}, |
|||
AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
AjaxOutputData = JSON.parse(AjaxOutputData.responseText); |
|||
resolve(AjaxOutputData); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEX_ProcessRefreshData(gettxdata, refreshdata){ |
|||
return new Promise((resolve, reject) => { |
|||
Promise.all(gettxdata.vin.map((vin_value, vin_index) => { |
|||
return new Promise((resolve, reject) => { |
|||
Promise.all(refreshdata.map((refresh_value, refresh_index) => { |
|||
if (refreshdata[refresh_index] !== undefined && refresh_value.txid == vin_value.txid) { |
|||
delete refreshdata[refresh_index]; |
|||
refreshdata = refreshdata; |
|||
resolve(refreshdata); |
|||
} |
|||
})); |
|||
}); |
|||
})) |
|||
.then(result=> { |
|||
var res_data = result[result.length - 1], |
|||
refresh_final = []; |
|||
|
|||
$.each(res_data,function(index) { |
|||
if(res_data[index] !== undefined) { |
|||
refresh_final.push(res_data[index]); |
|||
} |
|||
}); |
|||
resolve(refresh_final); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function EDEX_GetTxIDList(gettxdata) { |
|||
return new Promise((resolve, reject) => { |
|||
get_txid_list = []; |
|||
$.each(gettxdata.vin, function(vin_index, vin_value) { |
|||
get_txid_list.push(vin_value.txid); |
|||
}); |
|||
resolve(get_txid_list); |
|||
}); |
|||
} |
|||
|
|||
function EDEX_RemoveTXID(_obj, txidArray) { |
|||
var txidToStr = txidArray.join(':'); |
|||
|
|||
console.log(txidToStr); |
|||
if (_obj, _obj.basilisk) { |
|||
if (Object.keys(_obj.basilisk).length === 0) { |
|||
console.log('no coin nodes to parse'); |
|||
} else { |
|||
for (var key in _obj.basilisk) { |
|||
for (var coinAddr in _obj.basilisk[key]) { |
|||
if (_obj.basilisk[key][coinAddr] !== 'addresses') { |
|||
if (_obj.basilisk[key][coinAddr].refresh && |
|||
_obj.basilisk[key][coinAddr].refresh.data && |
|||
_obj.basilisk[key][coinAddr].refresh.data.length > 0) { |
|||
for (var i = 0; i < _obj.basilisk[key][coinAddr].refresh.data.length; i++) { |
|||
if (txidToStr.indexOf(_obj.basilisk[key][coinAddr].refresh.data[i].txid) > -1) { |
|||
_obj.basilisk[key][coinAddr].refresh.data.splice(i, 1); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} else { |
|||
console.log('basilisk node is missing'); |
|||
} |
|||
|
|||
return _obj; |
|||
} |
@ -1,93 +0,0 @@ |
|||
function Iguana_rmd160conv(rmd160conv_data) { |
|||
// comment
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'rmd160conv', |
|||
'rmd160': rmd160conv_data.rmd160, |
|||
'coin': rmd160conv_data.coin |
|||
}; |
|||
console.log(ajax_data); |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
console.log('== Data OutPut =='); |
|||
console.log(AjaxOutputData); |
|||
return AjaxOutputData; |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function Iguana_activehandle(callback) { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'activehandle' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.then(result => { |
|||
resolve(result); |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Iguana_Setactivehandle() { |
|||
//comment
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'activehandle' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data), |
|||
AjaxOutputDataToStore = JSON.stringify(data); |
|||
sessionStorage.setItem('IguanaActiveAccount', AjaxOutputDataToStore); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return 'Executed Iguana_activehandle. Check Iguana_activehandle_output var value.'; |
|||
} |
@ -1,37 +0,0 @@ |
|||
function Generic_Iguana_Jumblr(ajax_data, resolve) { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
ajax_data.userpass = tmpIguanaRPCAuth; |
|||
$.ajax({ |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
type: 'POST', |
|||
dataType: 'json' |
|||
}) |
|||
.done(function(data) { |
|||
resolve(data); |
|||
}); |
|||
} |
|||
|
|||
function Iguana_Jumblr_SetPassphrase(data) { |
|||
var ajax_data = { |
|||
'agent': 'jumblr', |
|||
'method': 'setpassphrase', |
|||
'passphrase': data.passphrase |
|||
}; |
|||
|
|||
return new Promise((resolve) => { |
|||
Generic_Iguana_Jumblr(ajax_data, resolve); |
|||
}); |
|||
} |
|||
|
|||
function Iguana_Jumblr_Status() { |
|||
var ajax_data = { |
|||
'agent': 'jumblr', |
|||
'method': 'status' |
|||
}; |
|||
|
|||
return new Promise((resolve) => { |
|||
Generic_Iguana_Jumblr(ajax_data, resolve); |
|||
}); |
|||
} |
@ -1,347 +0,0 @@ |
|||
function Shepherd_getConf(coin) { |
|||
var result = [], |
|||
ajax_data = { 'chain': coin }; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:17777/shepherd/getconf', |
|||
contentType: 'application/json', // send as JSON
|
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
console.log(AjaxOutputData.result); |
|||
result.push({ 'path': AjaxOutputData.result }); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function Shepherd_setConf(coin) { |
|||
var result = [], |
|||
ajax_data = { 'chain': coin }; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:17777/shepherd/setconf', |
|||
contentType: 'application/json', // send as JSON
|
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
console.log(AjaxOutputData); |
|||
result.push({ 'result': AjaxOutputData.msg }); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function Shepherd_herd(coin,herd_data) { |
|||
var result = []; |
|||
ajax_data = { |
|||
'herd': coin, |
|||
'options': herd_data |
|||
}; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:17777/shepherd/herd', |
|||
contentType: 'application/json', // send as JSON
|
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
console.log(AjaxOutputData); |
|||
result.push({ 'result': AjaxOutputData.msg }); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function Shepherd_herdlist(data) { |
|||
return new Promise((resolve) => { |
|||
var ajax_data_1 = { 'herdname': data }, |
|||
ajax_call_1 = $.ajax({ |
|||
data: JSON.stringify(ajax_data_1), |
|||
url: 'http://127.0.0.1:17777/shepherd/herdlist', |
|||
type: 'POST', |
|||
contentType: 'application/json' |
|||
}); |
|||
|
|||
ajax_call_1.done(function(data) { |
|||
resolve(data); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Shepherd_FetchBasiliskData(req_data) { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
parse_session_data = sessionStorage.getItem('IguanaActiveAccount'); |
|||
|
|||
parse_session_data = JSON.parse(JSON.parse(parse_session_data)); |
|||
|
|||
var session_pubkey = parse_session_data.pubkey, |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'pubkey': session_pubkey |
|||
}; |
|||
|
|||
console.log(req_data); |
|||
if (req_data.allcoins !== false ) { |
|||
var req_url = 'http://127.0.0.1:17777/shepherd/cache-all'; |
|||
} else { |
|||
var req_url = 'http://127.0.0.1:17777/shepherd/cache-one'; |
|||
ajax_data.coin = req_data.coin; |
|||
ajax_data.calls = req_data.calls; |
|||
} |
|||
|
|||
console.log(ajax_data); |
|||
|
|||
$.ajax({ |
|||
type: 'GET', |
|||
data: ajax_data, |
|||
url: req_url, |
|||
contentType: 'application/json', // send as JSON
|
|||
}) |
|||
.done(function(data) { |
|||
resolve(data); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Shepherd_GroomData_Get() { |
|||
return new Promise((resolve) => { |
|||
var parse_session_data = sessionStorage.getItem('IguanaActiveAccount'); |
|||
parse_session_data = JSON.parse(JSON.parse(parse_session_data)); |
|||
|
|||
var request_method = '', |
|||
session_pubkey = parse_session_data.pubkey, |
|||
ajax_data = { 'filename': session_pubkey }, |
|||
req_url = 'http://127.0.0.1:17777/shepherd/groom'; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'GET', |
|||
data: ajax_data, |
|||
url: req_url, |
|||
contentType: 'application/json', // send as JSON
|
|||
}) |
|||
.done(function(data) { |
|||
var res_data = JSON.parse(data); |
|||
resolve(res_data.result); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Shepherd_GroomData_Post(req_data) { |
|||
return new Promise((resolve) => { |
|||
var parse_session_data = sessionStorage.getItem('IguanaActiveAccount'); |
|||
parse_session_data = JSON.parse(JSON.parse(parse_session_data)); |
|||
|
|||
var request_method = '', |
|||
session_pubkey = parse_session_data.pubkey, |
|||
ajax_data = { |
|||
'filename': session_pubkey, |
|||
'payload': JSON.stringify(req_data) |
|||
}, |
|||
req_url = 'http://127.0.0.1:17777/shepherd/groom'; |
|||
|
|||
console.log(req_data); |
|||
console.log(ajax_data); |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: ajax_data, |
|||
url: req_url, |
|||
dataType: 'json' |
|||
}) |
|||
.done(function(data) { |
|||
var res_data = data; |
|||
resolve(res_data); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Shepherd_GroomData_Delete() { |
|||
return new Promise((resolve) => { |
|||
var parse_session_data = sessionStorage.getItem('IguanaActiveAccount'); |
|||
parse_session_data = JSON.parse(JSON.parse(parse_session_data)); |
|||
|
|||
var request_method = '', |
|||
session_pubkey = parse_session_data.pubkey, |
|||
ajax_data = { |
|||
'filename': session_pubkey |
|||
}, |
|||
req_url = 'http://127.0.0.1:17777/shepherd/groom'; |
|||
|
|||
$.ajax({ |
|||
type: 'DELETE', |
|||
data: ajax_data, |
|||
url: req_url, |
|||
dataType: 'json' |
|||
}) |
|||
.done(function(data) { |
|||
resolve(data); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Shepherd_GetBasiliskCache() { |
|||
return new Promise((resolve) => { |
|||
var parse_session_data = sessionStorage.getItem('IguanaActiveAccount'); |
|||
parse_session_data = JSON.parse(JSON.parse(parse_session_data)); |
|||
|
|||
var session_pubkey = parse_session_data.pubkey, |
|||
ajax_data = { 'pubkey': session_pubkey }; |
|||
|
|||
$.ajax({ |
|||
type: 'GET', |
|||
data: ajax_data, |
|||
url: 'http://127.0.0.1:17777/shepherd/cache', |
|||
contentType: 'application/json' // send as JSON
|
|||
}) |
|||
.done(function(data) { |
|||
resolve(data); |
|||
data = JSON.parse(data); |
|||
|
|||
if (data.result === 'JSON parse error') { |
|||
Shepherd_GroomData_Delete() |
|||
.then(function(result) { |
|||
console.log('error reading cache, flushing...'); |
|||
}); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Shepherd_CheckBasiliskCacheData(coin) { |
|||
return new Promise((resolve) => { |
|||
Shepherd_GetBasiliskCache() |
|||
.then(function(result) { |
|||
var _data = JSON.parse(result), |
|||
query = _data.result.basilisk, |
|||
coin_exists = true, |
|||
addresses_exists = true, |
|||
getbalance_exists = true, |
|||
listtransactions_exists = true, |
|||
listunspent_exists = true, |
|||
refresh_exists = true; |
|||
|
|||
if (!query) { |
|||
console.log('data not found.'); |
|||
var res_data = { |
|||
'coin': false, |
|||
'addresses': false, |
|||
'getbalance': false, |
|||
'listtransactions': false, |
|||
'listunspent': false, |
|||
'refresh': false |
|||
}; |
|||
resolve(res_data); |
|||
} else if (!query[coin]) { |
|||
console.log(coin + ' not found.'); |
|||
coin_exists = false; |
|||
var res_data = { |
|||
'coin': coin_exists, |
|||
'addresses': false, |
|||
'getbalance': false, |
|||
'listtransactions': false, |
|||
'listunspent': false, |
|||
'refresh': false |
|||
}; |
|||
resolve(res_data); |
|||
} else if (!('addresses' in query[coin])) { |
|||
console.log(coin + ' addresses not found.'); |
|||
addresses_exists = false; |
|||
res_data = { |
|||
'coin': coin_exists, |
|||
'getbalance': false, |
|||
'listtransactions': false, |
|||
'listunspent': false, |
|||
'refresh': false |
|||
}; |
|||
resolve(res_data); |
|||
} else { |
|||
Promise.all(query[coin].addresses.map((coinaddr_value,coinaddr_index) => { |
|||
return new Promise((resolve, reject) => { |
|||
var data = query[coin][coinaddr_value].getbalance; |
|||
|
|||
if (!('getbalance' in query[coin][coinaddr_value])) { |
|||
getbalance_exists = false; |
|||
} |
|||
|
|||
if (!('listtransactions' in query[coin][coinaddr_value])) { |
|||
listtransactions_exists = false; |
|||
} |
|||
|
|||
if (!('listunspent' in query[coin][coinaddr_value])) { |
|||
listunspent_exists = false; |
|||
} |
|||
|
|||
if (!('refresh' in query[coin][coinaddr_value])) { |
|||
refresh_exists = false; |
|||
} |
|||
|
|||
pass_data = { |
|||
'getbalance': getbalance_exists, |
|||
'listtransactions': listtransactions_exists, |
|||
'listunspent': listunspent_exists, |
|||
'refresh': refresh_exists |
|||
}; |
|||
resolve(pass_data); |
|||
}); |
|||
})) |
|||
.then(result => { |
|||
var res_data = result[result.length - 1]; |
|||
res_data.coin = coin_exists; |
|||
res_data.addresses = addresses_exists; |
|||
resolve(res_data); |
|||
}); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Shepherd_SysInfo() { |
|||
return new Promise((resolve) => { |
|||
$.ajax({ |
|||
type: 'GET', |
|||
url: 'http://127.0.0.1:17777/shepherd/sysinfo', |
|||
contentType: 'application/json' // send as JSON
|
|||
}) |
|||
.done(function(data) { |
|||
resolve(data); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
function Shepherd_SendPendValue() { |
|||
Shepherd_SysInfo().then(function(result) { |
|||
var ram_data = formatBytes(result.totalmem_bytes), |
|||
pend_val = null; |
|||
|
|||
if (ram_data.size === 'GB') { |
|||
if (ram_data.ramsize >= '63' ) { pend_val = 16; } |
|||
if (ram_data.ramsize >= '31' ) { pend_val = 8; } |
|||
if (ram_data.ramsize >= '15' ) { pend_val = 4; } |
|||
if (ram_data.ramsize <= '15' ) { pend_val = 1; } |
|||
} else { pend_val = 1; } |
|||
sessionStorage.setItem('IguanaPendValue', pend_val); |
|||
}); |
|||
} |
|||
|
|||
|
|||
|
@ -1,159 +0,0 @@ |
|||
var Jumblr = function() { |
|||
var handleJumblr = function() { |
|||
$( '.jumblr_show_hide_addr_btc_btn' ).click(function() { |
|||
$( '#jumblr_BTCjumblr' ).toggle(); |
|||
$( '#jumblr_BTCjumblr_showhide' ).toggle(); |
|||
}); |
|||
|
|||
$( '.jumblr_show_hide_addr_kmd_btn' ).click(function() { |
|||
$( '#jumblr_KMDjumblr' ).toggle(); |
|||
$( '#jumblr_KMDjumblr_showhide' ).toggle(); |
|||
}); |
|||
|
|||
if ( sessionStorage.getItem('IguanaActiveAccount') === null ) { |
|||
|
|||
} else { |
|||
Jumblr_CheckIfConnected() |
|||
.then(function(result) { |
|||
console.log(result); |
|||
if (result == 'connected') { |
|||
Jumblr_DisplayAddresses(); |
|||
Jumblr_DisplayStatus(); |
|||
Jumblr_ShowHideAlert(); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
$('#jumblr_actions_header').click(function() { |
|||
Jumblr_CheckIfConnected() |
|||
.then(function(result) { |
|||
console.log(result); |
|||
if (result == 'connected') { |
|||
Jumblr_DisplayAddresses(); |
|||
Jumblr_DisplayStatus(); |
|||
Jumblr_ShowHideAlert(); |
|||
} |
|||
}); |
|||
}) |
|||
}; |
|||
|
|||
return { |
|||
//main function to initiate the module
|
|||
init: function() { |
|||
handleJumblr(); |
|||
} |
|||
}; |
|||
}(); |
|||
|
|||
function Jumblr_ShowHideAlert() { |
|||
Jumblr_LookforNativeKomodo() |
|||
.then(function(result) { |
|||
if (result === 'isnative') { |
|||
$('#jumblr_no_native_kmd_alert').hide(); |
|||
} else { |
|||
$('#jumblr_no_native_kmd_alert').show(); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function Jumblr_DisplayAddresses() { |
|||
var jumblr_session_data = JSON.parse(JSON.parse(sessionStorage.getItem('IguanaActiveAccount'))); |
|||
$('#jumblr_BTCdeposit').text(jumblr_session_data.BTCdeposit); |
|||
$('#jumblr_BTCjumblr').text(jumblr_session_data.BTCjumblr); |
|||
$('#jumblr_KMDdeposit').text(jumblr_session_data.KMDdeposit); |
|||
$('#jumblr_KMDjumblr').text(jumblr_session_data.KMDjumblr); |
|||
} |
|||
|
|||
function Jumblr_DisplayStatus() { |
|||
Iguana_Jumblr_Status() |
|||
.then(function(result) { |
|||
if (result.result == 'success') { |
|||
$('#jumblr_status_result') |
|||
.addClass('label-success') |
|||
.removeClass('label-danger'); |
|||
} else { |
|||
$('#jumblr_status_result') |
|||
.addClass('label-danger') |
|||
.removeClass('label-success'); |
|||
} |
|||
$('#jumblr_status_result').text(result.result); |
|||
$('#jumblr_status_deposited').text(result.deposited); |
|||
$('#jumblr_status_t_to_z').text(result.t_to_z); |
|||
$('#jumblr_status_z_to_z').text(result.z_to_z); |
|||
$('#jumblr_status_z_to_t').text(result.z_to_t); |
|||
$('#jumblr_status_finished').text(result.finished); |
|||
$('#jumblr_status_pending').text(result.pending); |
|||
}); |
|||
} |
|||
|
|||
function Jumblr_LookforNativeKomodo() { |
|||
return new Promise((resolve) => { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'InstantDEX', |
|||
'method': 'allcoins' |
|||
}, |
|||
AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { |
|||
AjaxOutputData = JSON.parse(AjaxOutputData.responseText); |
|||
if (AjaxOutputData['native'].length !== 0 ) { |
|||
$.each(AjaxOutputData.native, function( index, value ) { |
|||
if (value !== 'KMD') { |
|||
console.log('Native KMD not found') |
|||
resolve('notfound'); |
|||
} else { |
|||
console.log('Native KMD found') |
|||
resolve('isnative'); |
|||
} |
|||
}); |
|||
} else { |
|||
resolve('notnative'); |
|||
} |
|||
}) |
|||
.fail(function(xhr, textStatus, error) { |
|||
// handle request failures
|
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
}) |
|||
}); |
|||
} |
|||
|
|||
function Jumblr_CheckIfConnected() { |
|||
return new Promise((resolve) => { |
|||
var extcoin = $('[data-extcoin]').attr('data-extcoin'), |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'getinfo', |
|||
'hex': '' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort |
|||
}) |
|||
.done(function(data) { |
|||
data = JSON.parse(data); |
|||
if ( data.errors != undefined ) { |
|||
resolve('connected'); |
|||
} else if (data.errors == '' ) { |
|||
resolve('connected'); |
|||
} else if ( data.errors == undefined) { |
|||
resolve('not active'); |
|||
} else { |
|||
resolve(data.errors); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
jQuery(document).ready(function() { |
|||
Jumblr.init(); |
|||
}); |
@ -1,278 +0,0 @@ |
|||
function KMDListaddrZ() { |
|||
var result = [], |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'z_listaddresses', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'z_listaddresses', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); // Ajax output gets the whole list of unspent coin with addresses
|
|||
// This code gets list of all z_addresses into an array
|
|||
// This function calls each address and then gets the total amount of coins in it.
|
|||
$.each(AjaxOutputData, function(index, value) { |
|||
var ajax_data_to_hex = '["' + value + '",0]', |
|||
tmpZaddrs_output = Iguana_HashHex(ajax_data_to_hex), |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data_zaddrbalance = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'z_getbalance', |
|||
'hex': tmpZaddrs_output |
|||
}; |
|||
} else { |
|||
var ajax_data_zaddrbalance = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'z_getbalance', |
|||
'hex': tmpZaddrs_output |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data_zaddrbalance), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
|
|||
if (AjaxOutputData.hasOwnProperty('error')) { |
|||
AjaxOutputData = 0; |
|||
} |
|||
var tmp_Zaddr_total_balance_output = { |
|||
'addr': value, |
|||
'total': AjaxOutputData |
|||
}; |
|||
|
|||
result.push(tmp_Zaddr_total_balance_output); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
}); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function KMDListAddresses(pubpriv) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var result = [], |
|||
ajax_data_to_hex = '', |
|||
ajax_function_input = '', |
|||
tmplistaddr_hex_input = ''; |
|||
|
|||
if ( pubpriv === 'public' ) { |
|||
ajax_function_input = 'getaddressesbyaccount'; |
|||
tmplistaddr_hex_input = '222200'; |
|||
} |
|||
if ( pubpriv === 'private' ) { |
|||
ajax_function_input = 'z_listaddresses'; |
|||
tmplistaddr_hex_input = ''; |
|||
} |
|||
|
|||
var passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': ajax_function_input, |
|||
'hex': tmplistaddr_hex_input |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': ajax_function_input, |
|||
'hex': tmplistaddr_hex_input |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); // Ajax output gets the whole list of unspent coin with addresses
|
|||
result = AjaxOutputData; |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return result; |
|||
} |
|||
|
|||
function KMDGetNewAddresses(pubpriv) { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var result = [], |
|||
ajax_function_input = ''; |
|||
|
|||
if ( pubpriv === 'public' ) { |
|||
ajax_function_input = 'getnewaddress'; |
|||
} |
|||
if ( pubpriv === 'private' ) { |
|||
ajax_function_input = 'z_getnewaddress'; |
|||
} |
|||
|
|||
var passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': ajax_function_input, |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': ajax_function_input, |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
result = data; |
|||
toastr.success(_lang[defaultLang].KMD_NATIVE.NEW_ADDR_GENERATED, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return result; |
|||
} |
|||
|
|||
function KMDListAllAddr() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var only_reciving_addr_data = [], |
|||
listTaddr = KMDListAddresses('public'), |
|||
listZaddr = KMDListAddresses('private'), |
|||
listAlladdr = $.merge( listTaddr, listZaddr ); |
|||
|
|||
$.each(listAlladdr, function(index, value) { |
|||
tmp_addr_label = '<span class="label label-default">' + |
|||
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].IAPI.PUBLIC_SM + |
|||
'</span>'; |
|||
if ( listAlladdr[index].slice(0, 2) == 'zc' || listAlladdr[index].slice(0, 2) == 'zt' ) { |
|||
tmp_addr_label = '<span class="label label-dark">' + |
|||
'<i class="icon fa-eye-slash"></i> ' + _lang[defaultLang].KMD_NATIVE.PRIVATE + |
|||
'</span>'; |
|||
} |
|||
only_reciving_addr_data.push([ |
|||
tmp_addr_label, |
|||
listAlladdr[index] |
|||
]); |
|||
}); |
|||
|
|||
var kmd_recieve_table = ''; |
|||
|
|||
kmd_recieve_table = $('#kmd-recieve-addr-tbl').DataTable({ |
|||
data: only_reciving_addr_data, |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
kmd_recieve_table.destroy(); |
|||
|
|||
kmd_recieve_table = $('#kmd-recieve-addr-tbl').DataTable({ |
|||
data: only_reciving_addr_data, |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return only_reciving_addr_data; |
|||
} |
@ -1,164 +0,0 @@ |
|||
function getTotalKMDBalance() { |
|||
var extcoin = $('[data-extcoin]').attr('data-extcoin'), |
|||
passthru_agent = ''; |
|||
|
|||
console.log($('[data-extcoin]').attr('data-extcoin')); |
|||
|
|||
if ( extcoin == 'KMD') { passthru_agent = 'komodo'; }; |
|||
if ( extcoin == 'ZEC') { passthru_agent = 'zcash'; }; |
|||
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if ( extcoin !== 'KMD' && extcoin !== 'ZEC' ) { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'iguana', |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'z_gettotalbalance', |
|||
'hex': '3000' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'z_gettotalbalance', |
|||
'hex': '3000' |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
|
|||
if (AjaxOutputData.interest != undefined && extcoin == 'KMD') { |
|||
console.log('show interest..'); |
|||
$('#kmd_total_interest_balance').text(parseFloat(AjaxOutputData.interest).toFixed(8) + ' ' + extcoin); |
|||
$('#kmd_widget_get_total_balance_i').show(); |
|||
$('#kmd_widget_get_total_balance_t') |
|||
.addClass(' col-lg-3') |
|||
.removeClass('col-lg-4'); |
|||
$('#kmd_widget_get_total_balance_z') |
|||
.addClass(' col-lg-3') |
|||
.removeClass(' col-lg-4'); |
|||
$('#kmd_widget_get_total_balance_tzi') |
|||
.addClass(' col-lg-3') |
|||
.removeClass(' col-lg-4'); |
|||
} else { |
|||
console.log('do not show interest...'); |
|||
$('#kmd_widget_get_total_balance_i').hide(); |
|||
$('#kmd_widget_get_total_balance_t') |
|||
.addClass(' col-lg-4') |
|||
.removeClass(' col-lg-3'); |
|||
$('#kmd_widget_get_total_balance_z') |
|||
.addClass(' col-lg-4') |
|||
.removeClass(' col-lg-3'); |
|||
$('#kmd_widget_get_total_balance_tzi') |
|||
.addClass(' col-lg-4') |
|||
.removeClass(' col-lg-3'); |
|||
} |
|||
$('#kmd_transparent_balance').text((AjaxOutputData.transparent ? parseFloat(AjaxOutputData.transparent).toFixed(8) : 0) + ' ' + extcoin); |
|||
$('#kmd_private_balance').text((AjaxOutputData.private ? parseFloat(AjaxOutputData.private).toFixed(8) : 0) + ' ' + extcoin); |
|||
$('#kmd_total_tz_balance').text((AjaxOutputData.total ? parseFloat(AjaxOutputData.total).toFixed(8) : 0) + ' ' + extcoin); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function getKMDBalanceT() { |
|||
var passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'getbalance', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'getbalance', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function getKMDBalanceZ() { |
|||
var passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'z_getbalance', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'z_getbalance', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
@ -1,102 +0,0 @@ |
|||
function getKMDWalletInfo() { |
|||
var passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'getwalletinfo', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'getwalletinfo', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
$('#kmd_walletversion').text(AjaxOutputData.walletversion); |
|||
$('#kmd_balance').text(AjaxOutputData.balance); |
|||
$('#kmd_unconfirmed_balance').text(AjaxOutputData.unconfirmed_balance); |
|||
$('#kmd_immature_balance').text(AjaxOutputData.immature_balance); |
|||
$('#KMDTotalTransactionsCount').text(AjaxOutputData.txcount); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function getKMDInfo() { |
|||
var passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'getinfo', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'getinfo', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
$('#kmd_version').text(AjaxOutputData.version); |
|||
$('#kmd_protocolversion').text(AjaxOutputData.protocolversion); |
|||
$('#kmd_notarized').text(AjaxOutputData.notarized); |
|||
$('#kmd_notarizedhash').text(AjaxOutputData.notarizedhash); |
|||
$('#kmd_notarizedbtc').text(AjaxOutputData.notarizedbtc); |
|||
$('#kmd_blocks').text(AjaxOutputData.blocks); |
|||
$('#kmd_connections').text(AjaxOutputData.connections); |
|||
$('#kmd_difficulty').text(AjaxOutputData.difficulty); |
|||
$('#kmd_testnet').text(AjaxOutputData.testnet); |
|||
$('#kmd_paytxfee').text(AjaxOutputData.paytxfee); |
|||
$('#kmd_relayfee').text(AjaxOutputData.relayfee); |
|||
$('#kmd_errors').text(AjaxOutputData.errors); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
@ -1,171 +0,0 @@ |
|||
var chainActivationLastUpdate, |
|||
chainActivationLastUpdateTimeout = 1; |
|||
|
|||
function checkTimestamp(dateToCheck) { |
|||
var currentEpochTime = new Date(Date.now()) / 1000, |
|||
secondsElapsed = Number(currentEpochTime) - Number(dateToCheck / 1000); |
|||
|
|||
return Math.floor(secondsElapsed); |
|||
} |
|||
|
|||
function RunKMDInitFunctions() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
function _RunKMDInitFunctions(check1) { |
|||
console.log(check1[0]); |
|||
if ( check1[0] == 'not active' ) { |
|||
console.log('Could not connect to external wallet. Is external wallet running?'); |
|||
toastr.error(_lang[defaultLang].TOASTR.KMD_NATIVE_CON_ERROR, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
$('#extcoin-wallet').hide(); |
|||
$('#extcoin-wallet-connection-alert').show(); |
|||
} |
|||
if ( check1[0] == 'null return' ) { |
|||
console.log('Could not connect to external wallet. Is iguana connected to external wallet?'); |
|||
toastr.error(_lang[defaultLang].TOASTR.KMD_IGUANA_CON_ERROR, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
$('#extcoin-wallet').hide(); |
|||
$('#extcoin-wallet-connection-alert').show(); |
|||
} |
|||
if ( check1[0] == 'activating' ) { |
|||
$('#extcoin-wallet-activating-alert').show(); |
|||
$('#extcoin-wallet').show(); |
|||
$('#extcoin-wallet-connection-alert').hide(); |
|||
|
|||
function _getKMDInfo() { |
|||
var passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'getinfo', |
|||
'hex': '' |
|||
}; |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
|
|||
if (AjaxOutputData && !AjaxOutputData.blocks) { |
|||
startBestBlockInterval(); |
|||
} else { |
|||
clearInterval(currentBestBlockInterval); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function getRemoteCurrentHeight() { |
|||
var extcoin = $('[data-extcoin]').attr('data-extcoin'); |
|||
|
|||
$.ajax({ |
|||
type: 'GET', |
|||
url: 'http://localhost:' + config.iguanaPort + '/api/dex/getinfo?userpass=tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth') + '&symbol=' + extcoin, |
|||
success: function(data, textStatus, jqXHR) { |
|||
data = JSON.parse(data); |
|||
|
|||
if (data && data.blocks) { |
|||
totalBlocksInExplorer = data.blocks; |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getinfo from dex api'); |
|||
console.log(xhr.statusText); |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
var currentBestBlockInterval; |
|||
function startBestBlockInterval() { |
|||
currentBestBlockInterval = setInterval(function() { |
|||
if (!chainActivationLastUpdate || checkTimestamp(chainActivationLastUpdate) > chainActivationLastUpdateTimeout) { |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: { |
|||
'herdname': 'komodo', |
|||
'lastLines': 1 |
|||
}, |
|||
url: 'http://127.0.0.1:17777/shepherd/debuglog', |
|||
success: function(data, textStatus, jqXHR) { |
|||
if (data.indexOf('UpdateTip') > -1) { |
|||
var temp = data.split(' '); |
|||
|
|||
for (var i = 0; i < temp.length; i++) { |
|||
if (temp[i].indexOf('height=') > -1) { |
|||
var currentBestChain = temp[i].replace('height=', ''); |
|||
$('#activating-komodod-tridot').hide(); |
|||
$('#activating-komodod-progress').html(': ' + Math.floor(currentBestChain * 100 / totalBlocksInExplorer) + '% (blocks ' + currentBestChain + ' / ' + totalBlocksInExplorer + ')'); |
|||
chainActivationLastUpdate = Date.now(); |
|||
if (currentBestChain === totalBlocksInExplorer) { |
|||
clearInterval(currentBestBlockInterval); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting debug.log'); |
|||
console.log(xhr.statusText); |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
}, 5000); |
|||
} |
|||
|
|||
if (sessionStorage.getItem('edexTmpMode') === 'Native') { |
|||
getRemoteCurrentHeight(); |
|||
|
|||
var totalBlocksInExplorer = 0, |
|||
totalBlocksInExplorerInterval = setInterval(function() { |
|||
getRemoteCurrentHeight(); |
|||
_getKMDInfo(); |
|||
}, 60000); |
|||
} else { |
|||
clearInterval(totalBlocksInExplorerInterval); |
|||
clearInterval(currentBestBlockInterval); |
|||
} |
|||
|
|||
$('#kmd_wallet_dashoard_section').show(); |
|||
$('#kmd_wallet_dashboardinfo').show(); |
|||
$('#kmd_wallet_send').hide(); |
|||
$('#kmd_wallet_recieve_section').hide(); |
|||
$('#kmd_wallet_settings').hide(); |
|||
} |
|||
if ( check1[0] == 'connected') { |
|||
getTotalKMDBalance(); |
|||
KMDfillTxHistoryT(); |
|||
$('#extcoin-wallet').show(); |
|||
$('#extcoin-wallet-connection-alert').hide(); |
|||
|
|||
$('#kmd_wallet_dashoard_section').show(); |
|||
$('#kmd_wallet_dashboardinfo').show(); |
|||
$('#kmd_wallet_send').hide(); |
|||
$('#kmd_wallet_recieve_section').hide(); |
|||
$('#kmd_wallet_settings').hide(); |
|||
} |
|||
|
|||
$('#kmd_wallet_recieve_section').hide(); |
|||
NProgress.done(); |
|||
} |
|||
CheckIfConnected(_RunKMDInitFunctions); |
|||
} |
@ -1,64 +0,0 @@ |
|||
function KMDZSendManyTransaction() { |
|||
var result = [], |
|||
zsendmoney_output = '', |
|||
tmp_zsendmany_from_addr = $('#kmd_wallet_send_from').val(), |
|||
tmp_zsendmany_to_addr = $('#kmd_wallet_sendto').val(), |
|||
tmp_zsendmany_total_amount = $('#kmd_wallet_total_value').text(), |
|||
ajax_data_to_hex = '["' + tmp_zsendmany_from_addr + '",[{"address":"' + tmp_zsendmany_to_addr + '","amount":' + tmp_zsendmany_total_amount + '}]]', |
|||
zsendmoney_output = Iguana_HashHex(ajax_data_to_hex), |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data_txid_input = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'z_sendmany', |
|||
'hex': zsendmoney_output |
|||
}; |
|||
} else { |
|||
var ajax_data_txid_input = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'z_sendmany', |
|||
'hex': zsendmoney_output |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data_txid_input), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
console.log('== Data OutPut of z_sendmany =='); |
|||
console.log(data); |
|||
result.push(data); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
KMDListAllOPIDs(); |
|||
return result; |
|||
} |
|||
|
|||
function clearSendManyFieldData() { |
|||
$('.showkmdwalletaddrs').selectpicker('refresh'); |
|||
$( |
|||
'#kmd_wallet_sendto,' + |
|||
'#kmd_wallet_amount' |
|||
) |
|||
.val(''); |
|||
$('#kmd_wallet_total_value').text(''); |
|||
} |
@ -1,215 +0,0 @@ |
|||
function KMDGetPublicTransactions() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var result = [], |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'listtransactions', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'listtransactions', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); // Ajax output gets the whole list of unspent coin with addresses
|
|||
|
|||
$.each(AjaxOutputData, function(index, value) { |
|||
var tmp_category = '', |
|||
tmp_addr = AjaxOutputData[index] ? AjaxOutputData[index].address : ''; |
|||
|
|||
if (AjaxOutputData[index] && !('address' in AjaxOutputData[index])) { |
|||
tmp_addr = '<i class="icon fa-bullseye"></i> <span class="label label-dark">' + _lang[defaultLang].DASHBOARD.ZADDR_NOT_LISTED + '!</span>'; |
|||
} |
|||
var tmp_secondsToString = secondsToString(AjaxOutputData[index].time); |
|||
|
|||
if ( AjaxOutputData[index].category == 'send' ) { |
|||
tmp_category = '<i class="icon fa-arrow-circle-left"></i> ' +_lang[defaultLang].DASHBOARD.OUT; |
|||
} |
|||
if ( AjaxOutputData[index].category == 'receive' ) { |
|||
tmp_category = '<i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN; |
|||
} |
|||
if ( AjaxOutputData[index].category == 'generate' ) { |
|||
tmp_category = '<i class="icon fa-cogs"></i> ' + _lang[defaultLang].DASHBOARD.MINED; |
|||
} |
|||
if ( AjaxOutputData[index].category == 'immature' ) { |
|||
tmp_category = '<i class="icon fa-clock-o"></i> ' + _lang[defaultLang].DASHBOARD.IMMATURE; |
|||
} |
|||
|
|||
tmplisttransactions = [ |
|||
'<span class="label label-default">' + |
|||
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].IAPI.PUBLIC_SM + |
|||
'</span>', |
|||
tmp_category, |
|||
AjaxOutputData[index].confirmations, |
|||
AjaxOutputData[index].amount, |
|||
tmp_secondsToString, |
|||
tmp_addr, |
|||
'<button type="button" class="btn btn-xs white btn-info waves-effect waves-light btn-kmdtxid" data-toggle="modal" data-target="#kmd_txid_info_mdl" id="kmd-txid-details-btn" data-txid-type="public" data-txid="' + AjaxOutputData[index].txid + '"><i class="icon fa-search"></i></button>' |
|||
]; |
|||
result.push(tmplisttransactions); |
|||
}); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return result; |
|||
} |
|||
|
|||
function KMDGetProtectedTransactions() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var result = [], |
|||
get_zaddr_list = KMDListaddrZ(); |
|||
|
|||
$.each(get_zaddr_list, function(index, value) { |
|||
var ajax_data_to_hex = '["' + value.addr + '",0]', |
|||
tmpzaddr_hex_input = Iguana_HashHex(ajax_data_to_hex), |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@ '+ sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'z_listreceivedbyaddress', |
|||
'hex': tmpzaddr_hex_input |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'z_listreceivedbyaddress', |
|||
'hex': tmpzaddr_hex_input |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); // Ajax output gets the whole list of unspent coin with addresses
|
|||
|
|||
$.each(AjaxOutputData, function(index, txidvalue) { |
|||
var tmp_category = '<i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].TOASTR.IN, |
|||
tmp_addr = value.addr.slice(0, 30) + '...'; |
|||
if (!('amount' in txidvalue)) { |
|||
var tmp_amount = 0; |
|||
} else { |
|||
var tmp_amount = txidvalue.amount; |
|||
} |
|||
|
|||
var tmp_addr_txid_info = KMDGetTransactionIDInfo(AjaxOutputData[index].txid), |
|||
tmp_confirmations = tmp_addr_txid_info[0].confirmations, |
|||
tmp_secondsToString = secondsToString(tmp_addr_txid_info[0].time), |
|||
tmplistZtransactions = [ |
|||
'<span class="label label-dark">' + |
|||
'<i class="icon fa-eye-slash"></i> ' + _lang[defaultLang].KMD_NATIVE.PRIVATE + |
|||
'</span>', |
|||
tmp_category, |
|||
tmp_confirmations, |
|||
tmp_amount, |
|||
tmp_secondsToString, |
|||
tmp_addr, |
|||
'<button type="button" class="btn btn-xs white btn-info waves-effect waves-light" data-toggle="modal" data-target="#kmd_txid_info_mdl" id="kmd-txid-details-btn" data-txid-type="private" data-txid="' + txidvalue.txid + '"><i class="icon fa-search"></i></button>' |
|||
]; |
|||
result.push(tmplistZtransactions); |
|||
}); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return result; |
|||
} |
|||
|
|||
function KMDfillTxHistoryT() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: '<div class="bar nprogress-bar-header nprogress-bar-info" role="bar"></div>' + |
|||
'<div class="spinner" role="spinner">' + |
|||
'<div class="spinner-icon"></div>' + |
|||
'</div>' |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var txhistorydataT = KMDGetPublicTransactions(), |
|||
txhistorydata = txhistorydataT, |
|||
kmd_txhistory_table = ''; |
|||
|
|||
kmd_txhistory_table = $('#kmd-tx-history-tbl').DataTable({ |
|||
data: txhistorydata, |
|||
'order': [ |
|||
[ |
|||
4, |
|||
'desc' |
|||
] |
|||
], |
|||
select: true, |
|||
retrieve: true |
|||
}); |
|||
|
|||
kmd_txhistory_table.destroy(); |
|||
kmd_txhistory_table = $('#kmd-tx-history-tbl').DataTable({ |
|||
data: txhistorydata, |
|||
'order': [ |
|||
[ |
|||
4, |
|||
'desc' |
|||
] |
|||
], |
|||
select: true, |
|||
retrieve: true |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
} |
@ -1,258 +0,0 @@ |
|||
function KMDlistunspentT() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var result = [], |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'listunspent', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'listunspent', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data), // Ajax output gets the whole list of unspent coin with addresses
|
|||
unique_addresses = _.keys(_.countBy(AjaxOutputData, function(data) { return data.address; })); // This code using underscore.js takes only the address into an array which are unique in that list
|
|||
|
|||
// This function calls each unique address and calculates the total amount of coins in it.
|
|||
$.each(unique_addresses, function(index) { |
|||
var unique_addr_tmp_array = _.where(AjaxOutputData, { address: unique_addresses[index] }), |
|||
tmpcalcnum = 0; |
|||
|
|||
$.each(unique_addr_tmp_array, function(index, value) { |
|||
tmpcalcnum = tmpcalcnum + value.amount; |
|||
}); |
|||
|
|||
var tmp_addr_total_balance_output = { |
|||
'addr': unique_addr_tmp_array[0].address, |
|||
'total': tmpcalcnum |
|||
}; |
|||
result.push(tmp_addr_total_balance_output); |
|||
}); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return result; |
|||
} |
|||
|
|||
function KMDGetTransactionIDInfo(txid) { |
|||
var result = [], |
|||
ajax_data_to_hex = '["' + txid + '"]', |
|||
tmptxid_output = Iguana_HashHex(ajax_data_to_hex), |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data_txid_input = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'gettransaction', |
|||
'hex': tmptxid_output |
|||
}; |
|||
} else { |
|||
var ajax_data_txid_input = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'gettransaction', |
|||
'hex': tmptxid_output |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data_txid_input), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
result.push(AjaxOutputData); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function KMDGetOPIDInfo(opid) { |
|||
var result = [], |
|||
tmpopid_output = ''; |
|||
|
|||
if ( opid === undefined ) { |
|||
tmpopid_output = ''; |
|||
} else { |
|||
var ajax_data_to_hex = '["' + opid + '"]', |
|||
tmpopid_output = Iguana_HashHex(ajax_data_to_hex); |
|||
} |
|||
|
|||
var passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data_txid_input = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'z_getoperationstatus', |
|||
'hex': tmpopid_output |
|||
}; |
|||
} else { |
|||
var ajax_data_txid_input = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'z_getoperationstatus', |
|||
'hex': tmpopid_output |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data_txid_input), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
result.push(AjaxOutputData); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function KMDListAllOPIDs() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
|
|||
var opids_statuses_data = [], |
|||
listOPIDs = KMDGetOPIDInfo(), |
|||
tmp_results = 'Waiting...', |
|||
tmp_status_label = '', |
|||
tmp_creation_time = '', |
|||
tmp_id = ''; |
|||
|
|||
console.log(listOPIDs); |
|||
$.each(listOPIDs[0], function(index, value) { |
|||
tmp_id = listOPIDs[0][index].id; |
|||
tmp_creation_time = secondsToString(listOPIDs[0][index].creation_time); |
|||
|
|||
if (listOPIDs[0][index].status === 'queued') { |
|||
tmp_status_label = '<span class="label label-warning">' + |
|||
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].KMD_NATIVE.QUEUED + |
|||
'</span>'; |
|||
tmp_results = '<i>' + _lang[defaultLang].KMD_NATIVE.PLEASE_REFRESH + '...</i>'; |
|||
} |
|||
if (listOPIDs[0][index].status === 'executing') { |
|||
tmp_status_label = '<span class="label label-info">' + |
|||
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].KMD_NATIVE.EXECUTING + |
|||
'</span>'; |
|||
tmp_results = '<i>' + _lang[defaultLang].KMD_NATIVE.PLEASE_REFRESH + '...</i>'; |
|||
} |
|||
if (listOPIDs[0][index].status === 'failed') { |
|||
tmp_status_label = '<span class="label label-danger">' + |
|||
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].KMD_NATIVE.FAILED + |
|||
'</span>'; |
|||
tmp_results = '<b>Error Code:</b> ' + listOPIDs[0][index].error.code + '<br> <b>' + _lang[defaultLang].KMD_NATIVE.MESSAGE + ':</b> ' + listOPIDs[0][index].error.message; |
|||
} |
|||
if (listOPIDs[0][index].status === 'success') { |
|||
tmp_status_label = '<span class="label label-success">' + |
|||
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].KMD_NATIVE.SUCCESS + |
|||
'</span>'; |
|||
tmp_results = '<b>txid:</b> ' + listOPIDs[0][index].result.txid + '<br> <b>' + _lang[defaultLang].KMD_NATIVE.EXECUTION_SECONDS + ':</b> ' + listOPIDs[0][index].execution_secs; |
|||
} |
|||
|
|||
opids_statuses_data.push([ |
|||
tmp_status_label, |
|||
tmp_id, |
|||
tmp_creation_time, |
|||
tmp_results |
|||
]); |
|||
}); |
|||
|
|||
var kmd_opids_statuses_table = ''; |
|||
|
|||
kmd_opids_statuses_table = $('#kmd-opid-status-tbl').DataTable({ |
|||
data: opids_statuses_data, |
|||
'order': [ |
|||
[ |
|||
2, |
|||
'desc' |
|||
] |
|||
], |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
kmd_opids_statuses_table.destroy(); |
|||
|
|||
kmd_opids_statuses_table = $('#kmd-opid-status-tbl').DataTable({ |
|||
data: opids_statuses_data, |
|||
'order': [ |
|||
[ |
|||
2, |
|||
'desc' |
|||
] |
|||
], |
|||
select: false, |
|||
retrieve: true |
|||
}); |
|||
|
|||
NProgress.done(); |
|||
return opids_statuses_data; |
|||
} |
@ -1,263 +0,0 @@ |
|||
var KMDWalletDashboard = function() { |
|||
var handle_KMD_Dashboard = function() { |
|||
var action_btn_code = getHeaderActionMenuButtonCoinCode(); |
|||
$('#btn_' + action_btn_code + '_wallet_dashboard').click(function() { |
|||
if ( sessionStorage.getItem('edexTmpMode') === 'Native') { |
|||
sessionStorage.setItem('edexTmpRefresh', 'start'); |
|||
} |
|||
if ( sessionStorage.getItem('edexTmpMode') === 'Basilisk' || sessionStorage.getItem('edexTmpMode') === 'Full' ) { |
|||
sessionStorage.setItem('edexTmpRefresh', 'stop'); |
|||
} |
|||
$( |
|||
'#kmd_wallet_dashoard_section,' + |
|||
'#kmd_wallet_dashboardinfo' |
|||
) |
|||
.show(); |
|||
$( |
|||
'#kmd_wallet_send,' + |
|||
'#kmd_wallet_recieve_section,' + |
|||
'#kmd_wallet_settings' |
|||
) |
|||
.hide(); |
|||
getTotalKMDBalance(); |
|||
KMDfillTxHistoryT(); |
|||
clearSendManyFieldData(); |
|||
}); |
|||
|
|||
$('.btn-kmdtxid').click(function() { |
|||
console.log('kmd-txid-details-btn button clicked!..'); |
|||
console.log($(this).data('txid-type')); |
|||
console.log($(this).data('txid')); |
|||
|
|||
var kmd_addr_txid_info = KMDGetTransactionIDInfo($(this).data('txid')); |
|||
console.log(kmd_addr_txid_info); |
|||
$('#kmd_txid_info_amount').text(kmd_addr_txid_info[0].amount); |
|||
$('#kmd_txid_info_fee').text(kmd_addr_txid_info[0].fee); |
|||
$('#kmd_txid_info_confirmations').text(kmd_addr_txid_info[0].confirmations); |
|||
$('#kmd_txid_info_blockhash').text(kmd_addr_txid_info[0].blockhash); |
|||
$('#kmd_txid_info_blockindex').text(kmd_addr_txid_info[0].blockindex); |
|||
$('#kmd_txid_info_blocktime').text(kmd_addr_txid_info[0].blocktime); |
|||
$('#kmd_txid_info_txid').text(kmd_addr_txid_info[0].txid); |
|||
$('#kmd_txid_info_walletconflicts').text(kmd_addr_txid_info[0].walletconflicts); |
|||
$('#kmd_txid_info_time').text(kmd_addr_txid_info[0].time); |
|||
$('#kmd_txid_info_timereceived').text(kmd_addr_txid_info[0].timereceived); |
|||
$('#kmd_txid_info_vjoinsplit').text(kmd_addr_txid_info[0].vjoinsplit); |
|||
$('#kmd_txid_info_details').text(kmd_addr_txid_info[0].details); |
|||
$('#kmd_txid_info_hex').val(kmd_addr_txid_info[0].hex); |
|||
clearSendManyFieldData(); |
|||
}); |
|||
} |
|||
|
|||
var handle_KMD_Send = function() { |
|||
var action_btn_code = getHeaderActionMenuButtonCoinCode(); |
|||
|
|||
$('#btn_' + action_btn_code + '_wallet_send').click(function() { |
|||
var tmpoptions = ''; |
|||
|
|||
KMDListAllOPIDs(); |
|||
sessionStorage.setItem('edexTmpRefresh', 'stop'); |
|||
|
|||
$('#kmd_wallet_send').show(); |
|||
$( |
|||
'#kmd_wallet_dashboardinfo,' + |
|||
'#kmd_wallet_recieve_section,' + |
|||
'#kmd_wallet_settings' |
|||
) |
|||
.hide(); |
|||
|
|||
var kmd_addr_list_with_balance = KMDlistunspentT(); |
|||
|
|||
tmpoptions += '<option> - ' + _lang[defaultLang].KMD_NATIVE.SELECT_ADDRESS + ' - </option>'; |
|||
$.each(kmd_addr_list_with_balance, function(index) { |
|||
tmpoptions += '<option value="' + kmd_addr_list_with_balance[index].addr + '" data-total="' + kmd_addr_list_with_balance[index].total.toFixed(8) + '">[ ' + kmd_addr_list_with_balance[index].total.toFixed(8) + ' KMD ]  ' + kmd_addr_list_with_balance[index].addr + '</option>'; |
|||
$('#kmd_wallet_send_from').html(tmpoptions); |
|||
}); |
|||
|
|||
var kmd_z_addr_list_with_balance = KMDListaddrZ(); |
|||
$.each(kmd_z_addr_list_with_balance, function(index) { |
|||
if (kmd_z_addr_list_with_balance[index].total !== 0) { |
|||
tmpoptions += '<option value="' + kmd_z_addr_list_with_balance[index].addr + '" data-total="' + kmd_z_addr_list_with_balance[index].total.toFixed(8) + '">[ ' + kmd_z_addr_list_with_balance[index].total.toFixed(8) + ' KMD ]  ' + kmd_z_addr_list_with_balance[index].addr + '</option>'; |
|||
$('#kmd_wallet_send_from').html(tmpoptions); |
|||
} |
|||
}); |
|||
|
|||
$('.showkmdwalletaddrs').selectpicker({ style: 'btn-info' }); |
|||
$('.showkmdwalletaddrs').selectpicker('refresh'); |
|||
clearSendManyFieldData(); |
|||
}); |
|||
|
|||
$('.showkmdwalletaddrs').on('change', function(){ |
|||
var selected = $(this).find('option:selected').val(); |
|||
}); |
|||
|
|||
$('#kmd_wallet_amount').keyup(function() { |
|||
var sum_val1 = parseFloat($('#kmd_wallet_amount').val()), |
|||
sum_val2 = parseFloat($('#kmd_wallet_fee').val()), |
|||
total_minus_currency_fee = sum_val1 - sum_val2, |
|||
mdl_send_btn = $('#kmd_wallet_send_coins_btn'); |
|||
|
|||
$('#kmd_wallet_total_value').text(total_minus_currency_fee.toFixed(8)); |
|||
|
|||
if ($('#kmd_wallet_send_from').val() != '- ' + _lang[defaultLang].KMD_NATIVE.SELECT_ADDRESS_ALT + ' -' && |
|||
$('#kmd_wallet_amount').val() != '' && |
|||
$('#kmd_wallet_sendto') != '' && |
|||
$('#kmd_wallet_fee') != '' ) { |
|||
mdl_send_btn.removeClass('disabled'); |
|||
} else { |
|||
mdl_send_btn.addClass('disabled'); |
|||
mdl_send_btn.removeAttr('data-dismiss'); |
|||
mdl_send_btn.removeAttr('data-target'); |
|||
} |
|||
}); |
|||
|
|||
$('#kmd_wallet_fee').keyup(function() { |
|||
var sum_val1 = parseFloat($('#kmd_wallet_amount').val()), |
|||
sum_val2 = parseFloat($('#kmd_wallet_fee').val()), |
|||
total_minus_currency_fee = sum_val1 - sum_val2, |
|||
mdl_send_btn = $('#kmd_wallet_send_coins_btn'); |
|||
|
|||
$('#kmd_wallet_total_value').text(total_minus_currency_fee.toFixed(8)); |
|||
|
|||
if ($('#kmd_wallet_send_from').val() != '- ' + _lang[defaultLang].KMD_NATIVE.SELECT_ADDRESS_ALT + ' -' && |
|||
$('#kmd_wallet_amount').val() != '' && |
|||
$('#kmd_wallet_sendto') != '' && |
|||
$('#kmd_wallet_fee') != '' ) { |
|||
mdl_send_btn.removeClass('disabled'); |
|||
} else { |
|||
mdl_send_btn.addClass('disabled'); |
|||
mdl_send_btn.removeAttr('data-dismiss'); |
|||
mdl_send_btn.removeAttr('data-target'); |
|||
} |
|||
}); |
|||
|
|||
$('.extcoin-send-form').validate({ |
|||
// errorElement: 'span', //default input error message container
|
|||
// errorClass: 'help-block', // default input error message class
|
|||
// focusInvalid: false, // do not focus the last invalid input
|
|||
rules: { |
|||
kmd_wallet_send_from: { |
|||
required: true |
|||
}, |
|||
kmd_wallet_sendto: { |
|||
required: true |
|||
}, |
|||
kmd_wallet_amount: { |
|||
required: true |
|||
}, |
|||
kmd_wallet_fee: { |
|||
required: true |
|||
}, |
|||
kmd_wallet_total_value: { |
|||
required: true |
|||
} |
|||
}, |
|||
|
|||
messages: { |
|||
kmd_wallet_send_from: { |
|||
required: _lang[defaultLang].DASHBOARD.SEND_FROMADDR_REQ |
|||
}, |
|||
kmd_wallet_sendto: { |
|||
required: _lang[defaultLang].DASHBOARD.SEND_TOADDR_REQ |
|||
}, |
|||
kmd_wallet_amount: { |
|||
required: _lang[defaultLang].DASHBOARD.SEND_AMOUNT_REQ |
|||
}, |
|||
kmd_wallet_fee: { |
|||
required: _lang[defaultLang].DASHBOARD.SEND_FEE_REQ + ' 0.0001 KMD.' |
|||
}, |
|||
kmd_wallet_total_value: { |
|||
required: _lang[defaultLang].DASHBOARD.SEND_TOTAL_REQ |
|||
} |
|||
}, |
|||
|
|||
submitHandler: function(form) { |
|||
console.log('Sent control here after clicked in form...'); |
|||
KMDZSendManyTransaction(); |
|||
clearSendManyFieldData(); |
|||
} |
|||
}); |
|||
|
|||
$('.extcoin-send-form #kmd_wallet_send_coins_btn').keypress(function(e) { |
|||
if (e.which == 13) { |
|||
if ($('.extcoin-send-form').validate().form()) { |
|||
$('.extcoin-send-form').submit(); // form validation success, call ajax form submit
|
|||
} |
|||
|
|||
return false; |
|||
} |
|||
}); |
|||
|
|||
$('#kmd_opids_status_btn').click(function(){ |
|||
KMDListAllOPIDs(); |
|||
}); |
|||
} |
|||
|
|||
var KMDWalletSettings = function() { |
|||
var action_btn_code = getHeaderActionMenuButtonCoinCode(); |
|||
|
|||
$('#btn_' + action_btn_code + '_wallet_settings').click(function() { |
|||
console.log('wallet settings button clicked...'); |
|||
sessionStorage.setItem('edexTmpRefresh', 'stop'); |
|||
$( |
|||
'#kmd_wallet_dashboardinfo,' + |
|||
'#kmd_wallet_dashoard_section,' + |
|||
'#kmd_wallet_send,' + |
|||
'#kmd_wallet_recieve_section' |
|||
) |
|||
.hide(); |
|||
$('#kmd_wallet_settings').show(); |
|||
getKMDWalletInfo(); |
|||
getKMDInfo(); |
|||
clearSendManyFieldData(); |
|||
}); |
|||
}; |
|||
|
|||
var KMDWalletRecieve = function() { |
|||
var action_btn_code = getHeaderActionMenuButtonCoinCode(); |
|||
|
|||
$('#btn_' + action_btn_code + '_wallet_recieve').click(function() { |
|||
sessionStorage.setItem('edexTmpRefresh', 'stop'); |
|||
$( |
|||
'#kmd_wallet_dashboardinfo,' + |
|||
'#kmd_wallet_dashoard_section,' + |
|||
'#kmd_wallet_send,' + |
|||
'#kmd_wallet_settings' |
|||
) |
|||
.hide(); |
|||
$('#kmd_wallet_recieve_section').show(); |
|||
KMDListAllAddr(); |
|||
clearSendManyFieldData(); |
|||
}); |
|||
|
|||
$('#kmd_get_new_taddr').click(function() { |
|||
console.log('get new T address button clicked...'); |
|||
KMDGetNewAddresses('public'); |
|||
KMDListAllAddr(); |
|||
toastr.info(_lang[defaultLang].TOASTR.RECADDR_UPDATED, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
}); |
|||
|
|||
$('#kmd_get_new_zaddr').click(function() { |
|||
console.log('get new Z address button clicked...'); |
|||
KMDGetNewAddresses('private'); |
|||
KMDListAllAddr(); |
|||
toastr.info(_lang[defaultLang].TOASTR.RECADDR_UPDATED, _lang[defaultLang].TOASTR.WALLET_NOTIFICATION); |
|||
}); |
|||
}; |
|||
|
|||
var handleWalletDashboardAlet = function() { |
|||
$('#extcoin-wallet-connection-alert-btn').click(function() { |
|||
RunKMDInitFunctions(); |
|||
}); |
|||
} |
|||
|
|||
return { |
|||
// main function to initiate the module
|
|||
init: function() { |
|||
handle_KMD_Dashboard(); |
|||
handle_KMD_Send(); |
|||
KMDWalletRecieve(); |
|||
KMDWalletSettings(); |
|||
handleWalletDashboardAlet(); |
|||
} |
|||
}; |
|||
}(); |
@ -1,265 +0,0 @@ |
|||
jQuery(document).ready(function() { |
|||
// KMDWalletDashboard.init();
|
|||
// TODO: refactor
|
|||
var RunNativeProgressBar = setInterval(function() { |
|||
if ( sessionStorage.getItem('IguanaActiveAccount') === null || |
|||
sessionStorage.getItem('NativeWalletActions') === null || |
|||
sessionStorage.getItem('NativeWalletActions') === 'stop' ) { |
|||
|
|||
} else if ( sessionStorage.getItem('NativeWalletActions') !== null || sessionStorage.getItem('NativeWalletActions') === 'start') { |
|||
KMD_ProgressBar(); |
|||
} |
|||
}, 5000); |
|||
|
|||
var RefreshEdexWalletDashboard = setInterval(function() { |
|||
if ( sessionStorage.getItem('IguanaActiveAccount') === null || |
|||
sessionStorage.getItem('NativeWalletActions') === null || |
|||
sessionStorage.getItem('NativeWalletActions') === 'stop' ) { |
|||
clearInterval(RefreshEdexWalletDashboard); |
|||
} else if ( sessionStorage.getItem('NativeWalletActions') === null || sessionStorage.getItem('NativeWalletActions') === 'start') { |
|||
if ( $('[data-data-extcoin]').attr('data-data-extcoin') !== 'COIN' ) { |
|||
if ( sessionStorage.getItem('edexTmpMode') !== null || sessionStorage.getItem('edexTmpMode') === 'Native') { |
|||
if ( sessionStorage.getItem('edexTmpRefresh') === null || sessionStorage.getItem('edexTmpRefresh') === 'start') { |
|||
var action_btn_code = getHeaderActionMenuButtonCoinCode(); |
|||
$( '#btn_' + action_btn_code + '_wallet_dashboard' ).trigger( 'click' ); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, 30000); |
|||
}); |
|||
|
|||
function getHeaderActionMenuButtonCoinCode() { |
|||
var extcoin = $('[data-extcoin]').attr('data-extcoin'), |
|||
action_menu_button_code = ''; |
|||
|
|||
if ( extcoin == 'KMD') { action_menu_button_code = 'kmd'; }; |
|||
if ( extcoin == 'ZEC') { action_menu_button_code = 'zec'; }; |
|||
|
|||
if (checkAC(extcoin)) { action_menu_button_code = 'acpax'; }; |
|||
|
|||
return action_menu_button_code; |
|||
} |
|||
|
|||
function getPassthruAgent() { |
|||
var extcoin = $('[data-extcoin]').attr('data-extcoin'); |
|||
passthru_agent = ''; |
|||
|
|||
console.log(extcoin); |
|||
|
|||
if ( extcoin == 'KMD') { passthru_agent = 'komodo'; }; |
|||
if ( extcoin == 'ZEC') { passthru_agent = 'zcash'; }; |
|||
|
|||
if (checkAC(extcoin)) { passthru_agent = 'iguana'; }; |
|||
|
|||
return passthru_agent; |
|||
} |
|||
|
|||
function CheckIfConnected(cb) { |
|||
var result = [], |
|||
extcoin = $('[data-extcoin]').attr('data-extcoin'), |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'getinfo', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'getinfo', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
|
|||
if ( AjaxOutputData.errors != undefined ) { |
|||
result.push('connected'); |
|||
} else if ( AjaxOutputData['error'].message = 'Activating best chain...' ) { |
|||
result.push('activating'); |
|||
} else if ( AjaxOutputData.errors == undefined) { |
|||
result.push('not active'); |
|||
} else { |
|||
result.push(AjaxOutputData.errors); |
|||
} |
|||
|
|||
cb.call(this, result); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
|
|||
cb.call(this, result); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
// TODO: this func is not used anywhere
|
|||
function CheckIfWalletEncrypted() { |
|||
var result = [], |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'walletlock', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'function': 'walletlock', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
console.log(ajax_data); |
|||
$.ajax({ |
|||
async: false, |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
console.log('== Data OutPut =='); |
|||
console.log(AjaxOutputData.error); |
|||
|
|||
if ( AjaxOutputData.errors != undefined ) { |
|||
result.push('encrypted'); |
|||
} else { |
|||
result.push(AjaxOutputData.error); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
|
|||
return result; |
|||
} |
|||
|
|||
function KMD_getInfo_rtrn(cb) { |
|||
var result = [], |
|||
extcoin = $('[data-extcoin]').attr('data-extcoin'), |
|||
passthru_agent = getPassthruAgent(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
|
|||
if (passthru_agent == 'iguana') { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'getinfo', |
|||
'hex': '' |
|||
}; |
|||
} else { |
|||
var ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': passthru_agent, |
|||
'method': 'passthru', |
|||
'asset': $('[data-extcoin]').attr('data-extcoin'), |
|||
'function': 'getinfo', |
|||
'hex': '' |
|||
}; |
|||
} |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AjaxOutputData = JSON.parse(data); |
|||
|
|||
if ( AjaxOutputData.errors != undefined ) { |
|||
result.push(AjaxOutputData); |
|||
} else if ( AjaxOutputData['error'].message = 'Activating best chain...' ) { |
|||
result.push('activating'); |
|||
} else if ( AjaxOutputData.errors == undefined) { |
|||
result.push('not active'); |
|||
} else { |
|||
result.push(AjaxOutputData.errors); |
|||
} |
|||
|
|||
cb.call(this, result[0]); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
cb.call(this, result); |
|||
} |
|||
}); |
|||
|
|||
return result[0]; |
|||
} |
|||
|
|||
function KMD_ProgressBar() { |
|||
var result = [], |
|||
extcoin = $('[data-extcoin]').attr('data-extcoin'); |
|||
|
|||
KMD_getInfo_rtrn(_KMD_ProgressBar); |
|||
|
|||
function _KMD_ProgressBar(getinfotmp) { |
|||
if (extcoin !== 'ZEC') { |
|||
if ( getinfotmp == 'activating') { |
|||
$('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(_lang[defaultLang].INDEX.ACTIVATING + '...'); |
|||
} else { |
|||
if (getinfotmp.blocks === 0) { |
|||
$('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No blocks'); |
|||
$('#extcoin-progressbars .progress-bar').css({ 'width': '100%' }); |
|||
} else if (getinfotmp.blocks > 0 && getinfotmp.longestchain === 0) { |
|||
$('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No longestchain'); |
|||
$('#extcoin-progressbars .progress-bar').css({ 'width': '100%' }); |
|||
} else { |
|||
var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10); |
|||
console.log('getinfotmp', getinfotmp); |
|||
$('div[data-extcoin="' + extcoin + '"][id="extcoin-sync"]').width(parseFloat(sync_percent).toFixed(2) + '%'); |
|||
$('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(parseFloat(sync_percent).toFixed(2) + '%'); |
|||
$('span[data-extcoin="' + extcoin + '"][id="extcoin-synced-blocks"]').text(getinfotmp.blocks); |
|||
$('span[data-extcoin="' + extcoin + '"][id="extcoin-longestchain"]').text(getinfotmp.longestchain); |
|||
$('span[data-extcoin="' + extcoin + '"][id="extcoin-connections"]').text(getinfotmp.connections); |
|||
} |
|||
$('#extcoin-wallet-activating-alert').hide(); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1,22 +0,0 @@ |
|||
var defaultLang = 'EN'; |
|||
|
|||
function lang() { |
|||
var htmlItems = $('[data-lang]'); |
|||
|
|||
for (var i = 0; i < htmlItems.length; i++) { |
|||
var langIDComponents = $(htmlItems[i]).attr('data-lang').split('.'); |
|||
|
|||
if (langIDComponents.length !== 2) { |
|||
console.log('lang placeholder ' + $(htmlItems[i]).attr('data-lang') + ' needs to be named as PARENT.CHILD in ' + defaultLang.toLowerCase() + '.js file'); |
|||
} else { |
|||
if (_lang && langIDComponents.length === 2 && _lang[defaultLang][langIDComponents[0]][langIDComponents[1]]) { |
|||
$(htmlItems[i]).html(_lang[defaultLang][langIDComponents[0]][langIDComponents[1]]); |
|||
} else { |
|||
$(htmlItems[i]).html('{{ ' + langIDComponents.join('.') + ' }}'); |
|||
console.log('Missing translation in lang/' + defaultLang.toLowerCase() + '.js ' + langIDComponents.join('.')); |
|||
} |
|||
} |
|||
} |
|||
|
|||
console.log(htmlItems.length + ' translation placeholders'); |
|||
} |
@ -1,355 +0,0 @@ |
|||
const _lang = { |
|||
'EN': { |
|||
'INDEX': { |
|||
'REFRESHING_BASILISK_NET': 'Refreshing Basilisk Network Connections', |
|||
'SELECT_A_COIN': 'Select Coin to add to EasyDEX', |
|||
'WALLETS': 'Wallets', |
|||
'ACTIVATE_COIN': 'Activate Coin', |
|||
'WELCOME_PLEASE_ADD': 'Welcome. Please add coin to start.', |
|||
'SELECT_SEED_TYPE': 'Please select compatible wallet seed type', |
|||
'SELECT': '-Select-', |
|||
'FULL_MODE': 'Full mode', |
|||
'FULL_MODE_DESC': 'Adding a coin in Full mode will download its complete blockchain to your local machine. ' + |
|||
'This is the most optimum mode for performance, but will require higher system requirements to have one or multiple coins running in Full mode on your local machine.', |
|||
'BASILISK_MODE': 'Basilisk Mode', |
|||
'BASILISK_MODE_DESC': 'In Basilisk Mode, a coin will not download its Full blockchain to the local machine. ' + |
|||
'This mode is best if you have less disk space on your machine, or your system has slower performance. ' + |
|||
'It will be fully functional, but a bit slower to perform as compared to Full mode.', |
|||
'NATIVE_MODE': 'Native Mode', |
|||
'NATIVE_MODE_DESC1': 'This mode is ONLY available for KOMODO Coin, PAX FIAT Chains, Assetchains, and Geckochains. ' + |
|||
'This mode uses the', |
|||
'NATIVE_MODE_DESC2': 'instead of the', |
|||
'NATIVE_MODE_DESC3': 'to query blockchain data', |
|||
'NATIVE_MODE_DESC4': 'is the so far mode which will allow you to do', |
|||
'NATIVE_MODE_DESC5': 'Z Transactions', |
|||
'NATIVE_MODE_DESC6': 'Private Transactions', |
|||
'UNSUPPORTED_BROWSER': 'Uh Oh! Unsupported Web Browser :-(', |
|||
'CLOSE': 'Close', |
|||
'IE_UNSUPPORTED': 'The current version of EasyDEX-GUI doesn\'t support Internet Explorer', |
|||
'PLEASE_USE': 'Please use either', |
|||
'OR': 'or', |
|||
'TO_USE': 'to use', |
|||
'PLEASE_CLICK_ON': 'Please click on browser\'s logo to visit website for installation instructions', |
|||
'WELCOME_LOGIN': 'Welcome. Please login', |
|||
'WALLET_SEED': 'Wallet Seed', |
|||
'SIGN_IN': 'Sign in', |
|||
'CREATE_WALLET': 'Create new wallet', |
|||
'LOGIN_ANOTHER_WALLET': 'Login to another wallet', |
|||
'CONFIRM_SEED': 'Confirm Wallet Seed', |
|||
'REGISTER': 'Register', |
|||
'BACK_TO_LOGIN': 'Back to Login', |
|||
'TOGGLE_NAV': 'Toggle navigation', |
|||
'TOGGLE_SEARCH': 'Toggle Search', |
|||
'TOGGLE_MENUBAR': 'Toggle menubar', |
|||
'SETTINGS': 'Settings', |
|||
'ABOUT_IGUANA': 'About Iguana', |
|||
'LOGOUT': 'Logout', |
|||
'DASHBOARD': 'Dashboard', |
|||
'WALLET_SETTINGS': 'Wallet Settings', |
|||
'KMD_WALLET': 'Komodo Wallet', |
|||
'ZC_WALLET': 'Zcash Wallet', |
|||
'ACTIVE_COINS': 'Active Coins', |
|||
'TRANSACTIONS': 'Transactions', |
|||
'SEND': 'Send', |
|||
'RECEIVE': 'Receive', |
|||
'BUNDLES': 'Bundles', |
|||
'BALANCES': 'Balances', |
|||
'BALANCE': 'Balance', |
|||
'VALIDATED': 'Validated', |
|||
'NO_WALLET_CAPS': 'NO WALLET SELECTED', |
|||
'PLEASE_SELECT_A_WALLET': 'Please select a wallet from active coins list on left', |
|||
'ADDRESS': 'Address', |
|||
'MY': 'My', |
|||
'COPY': 'copy', |
|||
'ACTIVATING_WALLET_RT': 'Activating wallet once Real Time blocks starts syncing...', |
|||
'IGUANA_FULL_MODE_SYNC_P1': 'An Iguana Full Mode coin synchronizes the blockchain using an entirely different format than traditional blockchain software. ' + |
|||
'Iguana\'s Full Mode uses Memory Mapped Files and stores data in bundles. ' + |
|||
'That\'s why you see four different colored synchronizing progress bars.', |
|||
'IGUANA_FULL_MODE_SYNC_P2': 'Once all these progress bars reach 100%, the Real Time blocks start synchronizing. ' + |
|||
'Only after the Real Time sync mode activates will you be able to see current data in your wallet and make any transactions.', |
|||
'IGUANA_FULL_MODE_SYNC_P3': 'Please wait for all other progress bars to disappear and the first blue bar turns to green.<br/>' + |
|||
'That would mean the wallet is in Real Time Sync mode.', |
|||
'FETCHING_COIN_DATA': 'Fetching coin data from network. Please wait...', |
|||
'INTEREST_EARNED': 'Interest Earned', |
|||
'TOTAL_BALANCE': 'Total Balance', |
|||
'FETCHING_BASILISK_DATA': 'Fetching Basilisk Data...', |
|||
'GET_BALANCE': 'Get Balance', |
|||
'REFRESH': 'Refresh', |
|||
'LIST_UNSPENT': 'List Unspent', |
|||
'LIST_TRANSACTIONS': 'List Transactions', |
|||
'BASILISK_ACTIONS': 'Basilisk Actions', |
|||
'GET_NOTARY_NODES_LIST': 'Get Notary Nodes List', |
|||
'REFRESH_BASILISK_CONNECTIONS': 'Refresh Basilisk Connections', |
|||
'FETCH_WALLET_DATA': 'Fetch Wallet Data', |
|||
'REFETCH_WALLET_DATA': 'Clear cache and fetch Wallet Data', |
|||
'TRANSACTION_HISTORY': 'Transactions History', |
|||
'DIRECTION': 'Direction', |
|||
'CONFIRMATIONS': 'Confirmations', |
|||
'AMOUNT': 'Amount', |
|||
'TIME': 'Time', |
|||
'DEST_ADDRESS': 'Dest. Address', |
|||
'TX_DETAIL': 'Tx Detail', |
|||
'FILL_SEND_FORM': 'Fill Send Form', |
|||
'FILL_SEND_DETAILS': 'Fill sending transaction details', |
|||
'CONFIRMING': 'Confirming', |
|||
'CONFIRM_DETAILS': 'Confirm if details are correct', |
|||
'PROCESSING_TX': 'Processing Tx', |
|||
'PROCESSING_DETAILS': 'Processing and showing details', |
|||
'SEND_FROM': 'Send From', |
|||
'SEND_TO': 'Send To', |
|||
'FEE': 'Fee', |
|||
'TOTAL': 'Total', |
|||
'AMOUNT_SM': 'amount', |
|||
'DONT_SEND': 'Don\'t Send Transaction. Just give me signed transaction bytes.', |
|||
'TO': 'To:', |
|||
'TX_FEE_REQ': 'Transaction Fee (Required by miners)', |
|||
'FROM': 'From:', |
|||
'CONFIRM': 'Confirm', |
|||
'BACK': 'Back', |
|||
'TRANSACTION_RESULT': 'Transaction Result', |
|||
'KEY': 'Key', |
|||
'VALUE': 'Value', |
|||
'INFO': 'Info', |
|||
'MAKE_ANOTHER_TX': 'Make Another Transaction', |
|||
'RECEIVING_ADDRESS': 'Receiving Addresses', |
|||
'TYPE': 'Type', |
|||
'INTEREST': 'Interest', |
|||
'OOPS_ERROR': 'Opps! Something is not right...', |
|||
'OOPS_ERROR_DESC': 'Could not connect to external wallet. Reasons can be:<br/>' + |
|||
'- Your External Wallet/daemon isn\'t running<br/>' + |
|||
'- Your External Wallet/daemon is running, but iguana is not given command to connect to External Wallet/daemon<br/>' + |
|||
'- Your External Wallet/daemon is setup, but is not setup with config settings like<br/>', |
|||
'ACTIVATING_CHAIN': 'Activating best chain', |
|||
'KMD_STARTED': 'Komodo daemon has been started and is processing.<br/>' + |
|||
'Please wait while the best chain is being activated.', |
|||
'CONNECTIONS': 'Connections', |
|||
'TRANSPARENT_BALANCE': 'Transparent Balance', |
|||
'Z_BALANCE': 'Private (Z) Balance', |
|||
'INTEREST_EARNED': 'Interest Earned', |
|||
'ZT_BALANCE': 'Total (Z+T) Balance', |
|||
'GET_NEW_ADDRESS': 'Get New Address', |
|||
'TRANSPARENT_ADDRESS': 'Transparent Address', |
|||
'PRIVATE_Z_ADDRESS': 'Private (Z) Address', |
|||
'OPERATIONS_STATUSES': 'Operations Statuses', |
|||
'STATUS': 'Status', |
|||
'RESULT': 'Result', |
|||
'WALLET_INFO': 'Wallet Info', |
|||
'WALLET_VERSION': 'Wallet Version', |
|||
'UNCONFIRMED_BALANCE': 'Unconfirmed Balance', |
|||
'IMMATURE_BALANCE': 'Immature Balance', |
|||
'TOTAL_TX_COUNT': 'Total Transactions Count', |
|||
'INFO': 'Info', |
|||
'VERSION': 'Version', |
|||
'PROTOCOL_VERSION': 'Protocol Version', |
|||
'NOTARIZED': 'Notarized', |
|||
'BLOCKS': 'Blocks', |
|||
'DIFFICULTY': 'Difficulty', |
|||
'PAY_TX_FEE': 'Pay Transaction Fee', |
|||
'RELAY_FEE': 'Relay Fee', |
|||
'ERRORS': 'Errors', |
|||
'ADD_NODE': 'Add Node', |
|||
'USE_THIS_SECTION': 'Use this section to check if the node IP you wish to add is allready active as peer of your coin:', |
|||
'SELECT_COIN': '-Select Coin-', |
|||
'CHECK_NODES': 'Check Nodes', |
|||
'USE_THIS_SECTION_PEER': 'Use this section to add a peer IP to a selected coin:', |
|||
'WALLET_BACKUP': 'Wallet Backup', |
|||
'FIAT_CURRENCY': 'Fiat Currency', |
|||
'EXPORT_KEYS': 'Export Keys', |
|||
'ONLY_ACTIVE_WIF_KEYS': 'Only the active coin wallet wif keys will be shown here.<br/>' + |
|||
'If you don\'t see a wif key for the coin you are looking for please active it by adding it from EasyDEX Dashboard.<br/>' + |
|||
'You can use these wif keys to import to another coin wallets.', |
|||
'PLEASE_KEEP_KEYS_SAFE': 'Please keep these keys extra safe and secure.', |
|||
'PASSPHRASE': 'Passphrase', |
|||
'GET_WIF_KEYS': 'Get Wif Keys', |
|||
'IMPORT_KEYS': 'Import Keys', |
|||
'IMPORT_KEYS_DESC_P1': 'This section allows you to import private key of all iguana supported coins, Assetchain, Geckochain, or PAXchain by the wallet.', |
|||
'IMPORT_KEYS_DESC_P2': 'It is not mandatory to have that coin active in the wallet for which you are executing import private key process.', |
|||
'IMPORT_KEYS_DESC_P3': 'You\'ll also notice the private key you imported for one coin or chain will also be showing a new address in all other coin wallets\' receiving address section. ' + |
|||
'It is normal.', |
|||
'INPUT_PRIV_KEY': 'Input Private Key', |
|||
'IMPORT_PRIV_KEY': 'Import Private Key', |
|||
'DEBUG_LOG': 'Debug Log', |
|||
'DEBUG_LOG_DESC': 'This section allows you to read last N lines from debug log file.', |
|||
'DEBUG_LOG_LINES': 'Input number of lines to read', |
|||
'TARGET': 'Target', |
|||
'LOAD_DEBUG_LOG': 'Load debug log', |
|||
'REFRESH_FUNDS': 'Refresh Funds', |
|||
'INFO': 'Info', |
|||
'ENTER': 'Enter', |
|||
'ADDR_SM': 'address', |
|||
'ACTIVATING': 'Activating' |
|||
}, |
|||
'JUMBLR': { |
|||
'NOTICE': 'EXPERIMENTAL TEST VERSION ONLY', |
|||
'DESCRIPTION': 'Jumblr feature is very experimental and for now, is Only enabled for testing and debugging.' + |
|||
'Please use the current version of Jumblr only with small amounts if you are participating in testing this feature.', |
|||
'NEED_NATIVE': 'Need Native Mode Komodo', |
|||
'TO_USE_JUMBLR': 'To use Jumblr feature, you need to activate Komodo in Native Mode.', |
|||
'IF_YOU_ALREADY_RUNNING': 'If you are already running Komodo in either Basilisk Mode or Full Mode, close the wallet and restart again to start Komodo In Native Mode.', |
|||
'THIS_SCREEN_DOESNT_REFRESH': 'This screen does not auto refresh. ' + |
|||
'You will need to hit the Refresh button on the top right corner of the screen to get latest Jumblr data.', |
|||
'FEW_SECURITY_NOTES': 'Few Security Notes for your Privacy and Anonymity of funds', |
|||
'FEW_SECURITY_NOTES_DESC1': 'Jumblr addresses (BTC Jumbler and KMD Jumbler) addresses are your Private Addresses.', |
|||
'FEW_SECURITY_NOTES_DESC2': 'DO NOT SHARE your Jumblr addresses with anyone.', |
|||
'FEW_SECURITY_NOTES_DESC3': 'Jumblr addresses are like YOUR PASSWORD. Keep them safe, secure and hidden.', |
|||
'FEW_SECURITY_NOTES_DESC4': 'Only YOU should know your Jumblr Address. Nobody else.', |
|||
'FEW_SECURITY_NOTES_DESC5': 'Sharing your Jumblr Addresses with ANYONE will defeat the purpose of using Jumblr, and your funds and transactions will not be private anymore.', |
|||
'ACCESS_JUMBLR_FUNDS': 'How to Access your Jumblr Funds', |
|||
'ADDRESS_ACCESSIBLE_EASILY': 'Your Jumbler Addresses are accessible easily. For example you logged into your wallet with passphrase', |
|||
'TO_ACCESS': 'To access your Jumbler address funds Logout.', |
|||
'CLOSE_IAPP': 'Close Iguana App.', |
|||
'START_IAPP': 'Start Iguana App again.', |
|||
'START_KMD': 'Start Komodo in either Full Mode or Basilisk Mode.', |
|||
'WORD_JUMBLR': 'Then add word \'jumblr \' before your passphrase.', |
|||
'SMALL_LETTERS': '"jumblr" is all in small letters.', |
|||
'WHITE_SPACE': 'There is a white space after "jumblr ".', |
|||
'PER_EXAMPLE': 'So as per this example, your Jumbler Addresses are accessible with:', |
|||
'LOGIN_WITH_JUMBLR': 'You\'ll login with your Jumblr passphrase to access funds and will be able to use it just like any other wallet address.', |
|||
'AGAIN_DONT_SHARE': 'Again, DO NOT SHARE YOUR JUMBLR ADDRESS WITH ANYONE.', |
|||
'USING_JUMBLR': 'Using Jumblr', |
|||
'RUN_KMD': 'Run Komodo in Native Mode', |
|||
'LOGIN_KMD': 'Login with your passphrase', |
|||
'GO_TO': 'Go to Jumblr Menu', |
|||
'FIND_DEPOSIT_ADDR': 'There find your Deposit Address for coin you want to anonymise your funds. (For a start only KMD is supported. BTC support will come in later versions)', |
|||
'YOU_SEND_FUNDS': 'You send your funds to deposit address.', |
|||
'KEEP_WALLET_OPEN': 'Keep your wallet open', |
|||
'IMPORTANT_FUNDS': '[IMPORTANT] Funds are processed in lot sizes 100 KMD, 1000 KMD, and 10,000 KMD.', |
|||
'LARGE_LOT': 'The large lot sizes will process first, and then smaller.', |
|||
'EG': 'For example, you sent 1393 KMD to KMD Deposit Address.<br>' + |
|||
'First it will process 1000 KMD<br>' + |
|||
'then 100 KMD<br>' + |
|||
'then 100 KMD<br>' + |
|||
'then 100 KMD', |
|||
'93_KMD': '93 KMD will keep waiting in deposit address.', |
|||
'TO_CLEAR_THEM': 'To clear them you\'ll have to send 7 KMD more to your KMD Deposit Address.', |
|||
'WHEN_IT_TOTALS': 'When it totals to 100 KMD, it will process to your KMD Jumblr Address.', |
|||
'JADDR': 'Jumblr Addresses', |
|||
'BTC_DEPOSIT': 'BTC Deposit', |
|||
'SHOW_HIDE': 'Show/Hide', |
|||
'HIDDEN': 'Hidden for security reason.', |
|||
'KMD_DEPOSIT': 'KMD Deposit', |
|||
'JSTATUS': 'Jumblr Status', |
|||
'RESULT': 'Result', |
|||
'DEPOSITED': 'Deposited', |
|||
'PUB_TO_PRIV': 'Public to Private', |
|||
'PRIV_TO_PRIV': 'Private to Private', |
|||
'PRIV_TO_PUB': 'Private to Public', |
|||
'FINISHED': 'Finished', |
|||
'PENDING': 'Pending' |
|||
}, |
|||
'DASHBOARD': { |
|||
'SELECT_ADDRESS': '- Select Address -', |
|||
'SEND_TOADDR_REQ': 'To Address is required.', |
|||
'SEND_FROMADDR_REQ': 'From Address is required.', |
|||
'SEND_AMOUNT_REQ': 'Please enter amount to send.', |
|||
'SEND_FEE_REQ': 'Make sure you have fee entered. Default value is', |
|||
'SEND_TOTAL_REQ': 'Make sure you have both amount and fee entered to calculate final total.', |
|||
'SEND_TX_PROGRESS': 'The transaction submitted is processing. Once processed the transaction details will be displayed here.', |
|||
'UNKNOWN': 'Unknown', |
|||
'IN': 'IN', |
|||
'OUT': 'OUT', |
|||
'MINED': 'Mined', |
|||
'IMMATURE': 'Immature', |
|||
'ZADDR_NOT_LISTED': 'Z Address not listed by wallet', |
|||
'ADDR_COPIED': 'Address Copied' |
|||
}, |
|||
'TOASTR': { |
|||
'WALLET_NOTIFICATION': 'Wallet Notification', |
|||
'ACCOUNT_NOTIFICATION': 'Account Notification', |
|||
'BASILISK_NOTIFICATION': 'Basilisk Notification', |
|||
'COIN_NOTIFICATION': 'Coin Notification', |
|||
'TX_NOTIFICATION': 'Transaction Notification', |
|||
'SERVICE_NOTIFICATION': 'Service Notification', |
|||
'LOGIN_NOTIFICATION': 'Login Notification', |
|||
'SETTINGS_NOTIFICATION': 'Settings Notification', |
|||
'RECADDR_UPDATED': 'Receiving Address list updated', |
|||
'IGUANA_CONN_ERR': 'Unable to connect to Iguana', |
|||
'FETCHING_DATA': 'Fetching Data. Please wait for a minute to complete this task.', |
|||
'LESS_RESPONSES_REQ': 'Less than required responses. Please try again.', |
|||
'LESS_RESPONSES_REQ_FOR': 'Less than required responses for', |
|||
'BASILISK_CON_REFRESHED': 'Basilisk nodes connections refreshed', |
|||
'SWITCHED_TO': 'switched to', |
|||
'MODE': 'Mode', |
|||
'TX_SENT': 'Transaction Sent', |
|||
'TX_SEND_ERR': 'Unable to complete transaction', |
|||
'LOOKS_LIKE': 'Looks like', |
|||
'ALREADY_RUNNING': 'already running', |
|||
'STARTED_IN': 'started in', |
|||
'IGUANA_CONN_ERR_ALT': 'Unable to connect with iguana service. 127.0.0.1:7778', |
|||
'KOMODO_ERR': 'Unable to start Komodod', |
|||
'IGUANA_ARE_YOU_SURE': 'Are you sure Iguana is running?', |
|||
'SIGNED_TX_GENERATED': 'Signed transaction generated', |
|||
'SIGNED_TX_GENERATED_FAIL': 'Signed transaction Failed to generate', |
|||
'SENDING_TX': 'Sending Transaction to Network', |
|||
'SIGNED_TX_SENT': 'Signed transaction sent successfully', |
|||
'GETTING_TXID_INFO': 'Getting txid info for updating funds data', |
|||
'REFRESHING_FUNDS': 'Refreshing Wallet Funds', |
|||
'TX_FAILED': 'Sent Transaction failed. Please check send Transaction page for details.', |
|||
'TX_SENT_ALT': 'Transaction sent successfully. Check send section for details.', |
|||
'COIN_STARTED': 'coin started', |
|||
'ADDR_ALREADY_REG': 'address already registered on network.', |
|||
'REG': 'Registered', |
|||
'REG_ADDR': 'address on network.', |
|||
'REG_ADDR_FAILED': 'address Registeration failed. Please try again.', |
|||
'INVALID_QUERY': 'Invalid query sent for', |
|||
'TRY_AGAIN': 'Please try again.', |
|||
'ADDR_ISNT_REG': 'Address isn\'t Registered on Network. Please Register', |
|||
'INVALID_QUERY_ALT': 'Invalid query sent. Please try again.', |
|||
'VALIDATION_SUCCESS': 'Validation Success on Network', |
|||
'KMD_NATIVE_CON_ERROR': 'Connection Error. Is external wallet running?', |
|||
'KMD_IGUANA_CON_ERROR': 'Connection Error. Is iguana connected to external wallet?', |
|||
'LOGIN_SUCCESSFULL': 'Login Successfull', |
|||
'NO_COIN_RUNNING': 'Seems like there\'s no coin running. Activating BTC.', |
|||
'OPPS': 'Opps... Something went wrong!', |
|||
'INVALID_PASSPHRASE': 'Invalid Passphrase. Make sure your passphrase is correct, or create new wallet.', |
|||
'WALLET_CREATED_SUCCESFULLY': 'Wallet created successfully', |
|||
'LOGOUT_SUCCESSFULL': 'Logout Successfull', |
|||
'WALLET_LOCKED': 'Wallet Locked Successfully', |
|||
'PRIV_KEY_IMPORTED': 'Private Key Imported Successfully!', |
|||
'PRIV_KEY_NOT_IMPORTED': 'Private Key is not imported.', |
|||
'NULL RETURN': 'null return from iguana_bitcoinRPC', |
|||
'ADDED_TO': 'added to', |
|||
'SUCCESSFULLY': 'Successfully' |
|||
}, |
|||
'COIN_WALLETS': { |
|||
'TX_FAILED': 'Transaction Failed', |
|||
'TX_SUCCESS': 'Transaction Successful', |
|||
'TX': 'Transaction' |
|||
}, |
|||
'IAPI': { |
|||
'PUBLIC_SM': 'public', |
|||
'CON_STATUS': 'Connection status' |
|||
}, |
|||
'KMD_NATIVE': { |
|||
'SELECT_ADDRESS': 'Select Transparent or Private Address', |
|||
'SELECT_ADDRESS_ALT': 'Select Transparent or Private KMD Address', |
|||
'PRIVATE': 'private', |
|||
'NEW_ADDR_GENERATED': 'New address generated successfully', |
|||
'QUEUED': 'Queued', |
|||
'PLEASE_REFRESH': 'Please press refresh button in a minute or so to see updated status', |
|||
'EXECUTING': 'Executing', |
|||
'FAILED': 'Failed', |
|||
'SUCCESS': 'Success', |
|||
'MESSAGE': 'Message', |
|||
'EXECUTION_SECONDS': 'Execution Seconds' |
|||
}, |
|||
'LOGIN': { |
|||
'PWD_REQ': 'Password is required.', |
|||
'WALLET_SEED_REQ': 'Wallet seed is required.', |
|||
'SAVED_WALLET_SEED': 'Have you saved your wallet seed?', |
|||
'SEED_MAKE_SURE_BACKUP': 'Make sure you have it backed up. Without this seed you won\'t be able to access your wallet in the future!', |
|||
'YES_I_BACKUP': 'Yes, I have taken backup.', |
|||
'WALLET_LOCKED_LOGIN': 'Wallet Locked. Please login.', |
|||
'UNLOCK': 'Unlock', |
|||
'SIGN_IN': 'Sign In', |
|||
'WELCOME': 'Welcome' |
|||
}, |
|||
'SIDEBAR': { |
|||
'EDEX_MOTTO': 'Most Secure, Easy and Native Decentralised Exchange', |
|||
'JUMBLR_MOTTO': 'Secure, Native and Decentralised Coin Anonymizer' |
|||
}, |
|||
'SETTINGS': { |
|||
'PASSPHRASE_REQ': 'Passphrase is required.' |
|||
} |
|||
} |
|||
}; |
@ -1,861 +0,0 @@ |
|||
const toastrConfig = { |
|||
'closeButton': true, |
|||
'debug': false, |
|||
'positionClass': 'toast-bottom-right', |
|||
'showDuration': '15000', |
|||
'hideDuration': '11000', |
|||
'timeOut': '5000', |
|||
'extendedTimeOut': '1000', |
|||
'showEasing': 'swing', |
|||
'hideEasing': 'linear', |
|||
'showMethod': 'fadeIn', |
|||
'hideMethod': 'fadeOut' |
|||
} |
|||
|
|||
var Login = function() { |
|||
toastr.options = toastrConfig; |
|||
|
|||
var handleLogin = function() { |
|||
$('.login-form').validate({ |
|||
// errorElement: 'span', //default input error message container
|
|||
// errorClass: 'help-block', // default input error message class
|
|||
// focusInvalid: false, // do not focus the last invalid input
|
|||
rules: { |
|||
password: { |
|||
required: true |
|||
} |
|||
}, |
|||
|
|||
messages: { |
|||
password: { |
|||
required: _lang[defaultLang].LOGIN.PWD_REQ |
|||
} |
|||
}, |
|||
|
|||
invalidHandler: function(event, validator) { // display error alert on form submit
|
|||
$('.alert-danger', $('.login-form')).show(); |
|||
}, |
|||
|
|||
highlight: function(element) { // hightlight error inputs
|
|||
$(element) |
|||
.closest('.form-group') |
|||
.addClass('has-error'); // set error class to the control group
|
|||
}, |
|||
|
|||
success: function(label) { |
|||
label |
|||
.closest('.form-group') |
|||
.removeClass('has-error'); |
|||
label.remove(); |
|||
}, |
|||
|
|||
errorPlacement: function(error, element) { |
|||
error.insertAfter(element.closest('.input-icon')); |
|||
}, |
|||
|
|||
submitHandler: function(form) { |
|||
var jumblr_setpassphrase_val = 'jumblr ' + $('#password').val(); |
|||
Iguana_Jumblr_SetPassphrase({ 'passphrase': jumblr_setpassphrase_val }) |
|||
.then(function(result) { |
|||
|
|||
}) |
|||
.then(function() { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'handle': $('#wallet-handle').val(), |
|||
'password': $('#password').val(), |
|||
'timeout': '2592000', |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'walletpassphrase' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: ajax_data, |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var LoginOutput = JSON.parse(data), |
|||
LoginDataToStore = JSON.stringify(data); |
|||
sessionStorage.setItem('IguanaActiveAccount', LoginDataToStore); |
|||
if (LoginOutput.result === 'success') { |
|||
console.log('Success'); |
|||
toastr.success(_lang[defaultLang].TOASTR.LOGIN_SUCCESSFULL, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
|
|||
$('#password').val('') |
|||
$('#wallet-login').hide(); |
|||
$('#wallet-core').fadeIn(); |
|||
$('body') |
|||
.removeClass( 'page-login layout-full page-dark' ) |
|||
.addClass( '' ); |
|||
$('link[id=loginStyle]')[0].disabled = true; |
|||
|
|||
location.reload(); |
|||
} else { |
|||
// If something goes wrong, alert the error message that our service returned
|
|||
if (LoginOutput.error === 'bitcoinrpc needs coin that is active') { |
|||
toastr.info(_lang[defaultLang].TOASTR.NO_COIN_RUNNING, _lang[defaultLang].TOASTR.COIN_NOTIFICATION); |
|||
var logincoinnames = []; |
|||
$('#logincoinslist input[type=checkbox]:checked').each(function() { logincoinnames.push(this.value); }); |
|||
console.log(logincoinnames); |
|||
|
|||
$.each(logincoinnames, function( index, value ) { |
|||
if ( value == 'BTC' ) { |
|||
var logincoinmodeval = $('input[name="logincoinbtcmode"]:checked').val(), |
|||
logincoin_data = { |
|||
'coin': value, |
|||
'mode': logincoinmodeval |
|||
}; |
|||
Iguana_addcoinLogin(logincoin_data); |
|||
} |
|||
if ( value == 'BTCD' ) { |
|||
var logincoinmodeval = $('input[name="logincoinbtcdmode"]:checked').val(), |
|||
logincoin_data = { |
|||
'coin': value, |
|||
'mode': logincoinmodeval |
|||
}; |
|||
Iguana_addcoinLogin(logincoin_data); |
|||
} |
|||
if ( value == 'KMD' ) { |
|||
var logincoinmodeval = $('input[name="logincoinkmdmode"]:checked').val(), |
|||
logincoin_data = { |
|||
'coin': value, |
|||
'mode': logincoinmodeval |
|||
}; |
|||
Iguana_addcoinLogin(logincoin_data); |
|||
} |
|||
}); |
|||
} else if ( LoginOutput.error === 'invalid passphrase' ) { |
|||
toastr.info(_lang[defaultLang].TOASTR.INVALID_PASSPHRASE, _lang[defaultLang].TOASTR.LOGIN_NOTIFICATION); |
|||
} else { |
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
|
|||
console.log(data.statusText); |
|||
console.log(textStatus); |
|||
console.log(jqXHR); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failure'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
}) |
|||
|
|||
$('#section-dashboard').show(); |
|||
$( |
|||
'#section-easydex,' + |
|||
'#section-about-iguana' |
|||
) |
|||
.hide(); |
|||
$('#nav-dashboard') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$( |
|||
'#nav-easydex,' + |
|||
'#nav-about-iguana' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
} |
|||
}); |
|||
|
|||
$('.login-form input').keypress(function(e) { |
|||
if (e.which == 13) { |
|||
if ($('.login-form').validate().form()) { |
|||
$('.login-form').submit(); // form validation success, call ajax form submit
|
|||
} |
|||
|
|||
return false; |
|||
} |
|||
}); |
|||
|
|||
$('input[name=PassPhraseOptions]').on('change', function() { |
|||
if ( $('input[name=PassPhraseOptions]:checked', '.register-form').val() === 'PassPhraseOptionsIguana' ) { |
|||
console.log('PassPhraseOptionsIguana'); |
|||
$('#walletseed').text(PassPhraseGenerator.generatePassPhrase(256)); |
|||
} |
|||
if ( $('input[name=PassPhraseOptions]:checked', '.register-form').val() === 'PassPhraseOptionsWaves' ) { |
|||
console.log('PassPhraseOptionsWaves'); |
|||
$('#walletseed').text(PassPhraseGenerator.generatePassPhrase(160)); |
|||
} |
|||
if ( $('input[name=PassPhraseOptions]:checked', '.register-form').val() === 'PassPhraseOptionsNXT' ) { |
|||
console.log('PassPhraseOptionsNXT'); |
|||
$('#walletseed').text(PassPhraseGenerator.generatePassPhrase(128)); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
var handleRegister = function() { |
|||
$('.register-form').validate({ |
|||
errorElement: 'span', // default input error message container
|
|||
errorClass: 'help-block', // default input error message class
|
|||
focusInvalid: false, // do not focus the last invalid input
|
|||
ignore: '', |
|||
rules: { |
|||
walletseed: { |
|||
required: true |
|||
}, |
|||
rwalletseed: { |
|||
equalTo: '#walletseed' |
|||
} |
|||
}, |
|||
|
|||
messages: { |
|||
rwalletseed: { |
|||
required: _lang[defaultLang].LOGIN.WALLET_SEED_REQ |
|||
} |
|||
}, |
|||
|
|||
invalidHandler: function(event, validator) { // display error alert on form submit
|
|||
|
|||
}, |
|||
|
|||
highlight: function(element) { // hightlight error inputs
|
|||
$(element) |
|||
.closest('.form-group') |
|||
.addClass('has-error'); // set error class to the control group
|
|||
}, |
|||
|
|||
success: function(label) { |
|||
label |
|||
.closest('.form-group') |
|||
.removeClass('has-error'); |
|||
label.remove(); |
|||
}, |
|||
|
|||
errorPlacement: function(error, element) { |
|||
if (element.attr('name') == 'backupconfirm') { // insert checkbox errors after the container
|
|||
error.insertAfter($('#register_backupconfirm_error')); |
|||
} else if (element.closest('.input-icon').size() === 1) { |
|||
error.insertAfter(element.closest('.input-icon')); |
|||
} else { |
|||
error.insertAfter(element); |
|||
} |
|||
}, |
|||
|
|||
submitHandler: function(form) { |
|||
swal({ |
|||
title: _lang[defaultLang].LOGIN.SAVED_WALLET_SEED, |
|||
text: _lang[defaultLang].LOGIN.SEED_MAKE_SURE_BACKUP, |
|||
type: 'warning', |
|||
showCancelButton: true, |
|||
confirmButtonColor: '#3085d6', |
|||
cancelButtonColor: '#d33', |
|||
confirmButtonText: _lang[defaultLang].LOGIN.YES_I_BACKUP |
|||
}) |
|||
.then(function() { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'encryptwallet', |
|||
'passphrase': $('#walletseed').val() |
|||
}; |
|||
// Use AJAX to post the object to login user
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: ajax_data, |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var CreateWalletOutput = JSON.parse(data); |
|||
|
|||
if (CreateWalletOutput.result === 'success') { |
|||
console.log('Success'); |
|||
toastr.success(_lang[defaultLang].TOASTR.WALLET_CREATED_SUCCESFULLY, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
|
|||
$('#wallet-handle').val(''); |
|||
$('#password').val(''); |
|||
} else { |
|||
// If something goes wrong, alert the error message that our service returned
|
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
console.log(CreateWalletOutput); |
|||
|
|||
if (CreateWalletOutput.error === 'bitcoinrpc needs coin that is active') { |
|||
var logincoinnames = []; |
|||
|
|||
toastr.info(_lang[defaultLang].TOASTR.NO_COIN_RUNNING, _lang[defaultLang].TOASTR.COIN_NOTIFICATION); |
|||
$('#logincoinslist input[type=checkbox]:checked').each(function() { logincoinnames.push(this.value); }); |
|||
console.log(logincoinnames); |
|||
|
|||
$.each(logincoinnames, function( index, value ) { |
|||
if ( value == 'BTC' ) { |
|||
var logincoinmodeval = $('input[name="logincoinbtcmode"]:checked').val(), |
|||
logincoin_data = { |
|||
'coin': value, |
|||
'mode': logincoinmodeval, |
|||
'reload': false |
|||
}; |
|||
Iguana_addcoin(logincoin_data); |
|||
if (index == '0' ) { |
|||
console.log(value + ' ' + index); |
|||
$('.register-form').submit(); |
|||
toastr.success(_lang[defaultLang].TOASTR.WALLET_CREATED_SUCCESFULLY, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
} |
|||
if ( value == 'BTCD' ) { |
|||
var logincoinmodeval = $('input[name="logincoinbtcdmode"]:checked').val(), |
|||
logincoin_data = { |
|||
'coin': value, |
|||
'mode': logincoinmodeval, |
|||
'reload': false |
|||
}; |
|||
Iguana_addcoin(logincoin_data); |
|||
if (index == '0' ) { |
|||
console.log(value + ' ' + index); |
|||
$('.register-form').submit(); |
|||
toastr.success(_lang[defaultLang].TOASTR.WALLET_CREATED_SUCCESFULLY, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
} |
|||
}); |
|||
} else { |
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
|
|||
console.log(data.statusText); |
|||
|
|||
if ( data.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
|
|||
console.log(textStatus); |
|||
console.log(jqXHR); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failure'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
}); |
|||
|
|||
$('#section-login').fadeIn(); |
|||
$('#section-register').hide(); |
|||
$('#walletseed').text(PassPhraseGenerator.generatePassPhrase(256)); |
|||
$( |
|||
'#rwalletseed,' + |
|||
'#register_password,' + |
|||
'#rpassword' |
|||
) |
|||
.val(''); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
$('.register-form input').keypress(function(e) { |
|||
if (e.which == 13) { |
|||
if ($('.register-form').validate().form()) { |
|||
$('.register-form').submit(); |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
}); |
|||
|
|||
jQuery('#register-btn').click(function() { |
|||
event.preventDefault(); |
|||
$('#section-login').hide(); |
|||
$('#section-register').fadeIn(); |
|||
$('#walletseed').text(PassPhraseGenerator.generatePassPhrase(256)); |
|||
}); |
|||
|
|||
jQuery('#register-back-btn').click(function() { |
|||
event.preventDefault(); |
|||
$('#section-login').fadeIn(); |
|||
$('#section-register').hide(); |
|||
}); |
|||
} |
|||
|
|||
var handleLogout = function() { |
|||
$('#logout-account').click(function() { |
|||
$('#section-login-addcoin-btn').hide(); |
|||
$('#section-login').show(); |
|||
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'walletlock' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var LogoutOutput = JSON.parse(data); |
|||
sessionStorage.removeItem('IguanaActiveAccount'); |
|||
console.log('== Logout Data OutPut =='); |
|||
console.log(LogoutOutput); |
|||
|
|||
if (LogoutOutput.result === 'success') { |
|||
console.log('Success'); |
|||
toastr.success(_lang[defaultLang].TOASTR.LOGOUT_SUCCESSFULL, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
$('#wallet-login').show(); |
|||
$('body') |
|||
.removeClass( '' ) |
|||
.addClass( 'page-login layout-full page-dark' ); |
|||
$('#wallet-core').hide(); |
|||
$('link[id=loginStyle]')[0].disabled = false; |
|||
|
|||
// Make sure these fields are unhidden.
|
|||
$('#login-welcome').text(_lang[defaultLang].LOGIN.WELCOME + '.'); |
|||
$( |
|||
'#wallet-handle,' + |
|||
'.create-account,' + |
|||
'#register-btn' |
|||
) |
|||
.show(); |
|||
$('#logint-another-wallet').hide(); |
|||
$('#loginbtn').text(_lang[defaultLang].LOGIN.SIGN_IN); |
|||
|
|||
//Stop SetInterval Calls
|
|||
StopShowCoinHistory(); |
|||
StopTotalFiatValue(); |
|||
} else { |
|||
// If something goes wrong, alert the error message that our service returned
|
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
console.log(data.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(jqXHR); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failure'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
}); |
|||
}); |
|||
}; |
|||
|
|||
var handleLock = function() { |
|||
// Begin Lock Active Wallet
|
|||
$('#lock-screen').click(function() { |
|||
$('#section-login-addcoin-btn').hide(); |
|||
$('#section-login').show(); |
|||
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'walletlock' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var LockOutput = JSON.parse(data); |
|||
// Begin Check Active Wallet's status
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data_activehandle = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'activehandle' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data_activehandle), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var ActiveHandleOutput = JSON.parse(data), |
|||
ActiveHandleDataToStore = JSON.stringify(data); |
|||
|
|||
sessionStorage.setItem('IguanaActiveAccount', ActiveHandleDataToStore); |
|||
console.log('== Data OutPut - Active Handle =='); |
|||
console.log(ActiveHandleOutput); |
|||
|
|||
if (ActiveHandleOutput.status === 'locked') { |
|||
console.log('Success'); |
|||
toastr.success(_lang[defaultLang].TOASTR.WALLET_LOCKED, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
|
|||
$('#wallet-login').show(); |
|||
$('body') |
|||
.removeClass( '' ) |
|||
.addClass( 'page-login layout-full page-dark' ); |
|||
$('#wallet-core').hide(); |
|||
$('link[id=loginStyle]')[0].disabled = false; |
|||
$('#loginbtn').text(_lang[defaultLang].LOGIN.UNLOCK); |
|||
// Hide some login fields not needing at lock screen
|
|||
console.log('Wallet is Locked.'); |
|||
$('#login-welcome').text(_lang[defaultLang].LOGIN.WALLET_LOCKED_LOGIN); |
|||
$( |
|||
'#register-btn,' + |
|||
'#logincoinslist' |
|||
) |
|||
.hide(); |
|||
$('#logint-another-wallet').show(); |
|||
} else { |
|||
// If something goes wrong, alert the error message that our service returned
|
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
console.log(data.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(jqXHR); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failure'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
}); |
|||
// End Check Active Wallet's status
|
|||
// console.log('== Data OutPut - Wallet Lock ==');
|
|||
// console.log(LockOutput);
|
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failure'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
}); |
|||
}); |
|||
// End Lock Active Wallet
|
|||
}; |
|||
|
|||
var handleCheckLogin = function() { |
|||
if ( sessionStorage.getItem('IguanaActiveAccount') === null ) { |
|||
console.log('There\'s no active wallet logged in. Please Login.'); |
|||
$('#logint-another-wallet').hide(); |
|||
Iguana_CheckActiveCoins() |
|||
.then(function(result) { |
|||
if (result.length !== 0 ) { |
|||
$('#section-login-addcoin-btn').hide(); |
|||
$('#section-login').show(); |
|||
} |
|||
}); |
|||
} else { |
|||
var CheckLoginData = JSON.parse(sessionStorage.getItem('IguanaActiveAccount')); |
|||
|
|||
Iguana_activehandle() |
|||
.then(function(result) { |
|||
if ( JSON.parse(CheckLoginData).pubkey != result.pubkey ) { |
|||
ClearOnLogout(false, false); |
|||
} |
|||
}); |
|||
|
|||
if ( JSON.parse(CheckLoginData).status === 'unlocked' ) { |
|||
console.log(JSON.parse(CheckLoginData).status); |
|||
$('#password').val('') |
|||
$('#wallet-login').hide(); |
|||
$('body') |
|||
.removeClass( 'page-login layout-full page-dark' ) |
|||
.addClass( '' ); |
|||
$('#wallet-core').fadeIn(); |
|||
} else if ( JSON.parse(CheckLoginData).status === 'locked' ) { |
|||
console.log('Wallet is Locked.'); |
|||
$('#login-welcome').text(_lang[defaultLang].LOGIN.WALLET_LOCKED_LOGIN); |
|||
$( |
|||
'#register-btn,' + |
|||
'#section-login-addcoin-btn' |
|||
) |
|||
.hide(); |
|||
$('#loginbtn').text(_lang[defaultLang].LOGIN.UNLOCK); |
|||
$('#section-login').show(); |
|||
} |
|||
} |
|||
if ( sessionStorage.getItem('IguanaRPCAuth') === null || typeof sessionStorage.getItem('IguanaRPCAuth') == undefined) { |
|||
Iguana_SetRPCAuth(); |
|||
Shepherd_SendPendValue(); |
|||
typeof sessionStorage.getItem('IguanaRPCAuth'); |
|||
console.log(sessionStorage.getItem('IguanaRPCAuth')); |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); |
|||
console.log(tmpIguanaRPCAuth); |
|||
} |
|||
}; |
|||
|
|||
var handleCoinsRunningCheck = function() { |
|||
Iguana_CheckActiveCoins() |
|||
.then(function(result) { |
|||
if (result.length !== 0 ) { |
|||
$('#section-login-addcoin-btn').hide(); |
|||
$('#section-login').show(); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
var handleLoginAnotherWallet = function() { |
|||
$('#logint-another-wallet').click(function() { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'walletlock' |
|||
}; |
|||
|
|||
$('#logint-another-wallet').show(); |
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var LogoutOutput = JSON.parse(data); |
|||
sessionStorage.removeItem('IguanaActiveAccount'); |
|||
|
|||
if (LogoutOutput.result === 'success') { |
|||
console.log('Success'); |
|||
toastr.success(_lang[defaultLang].TOASTR.LOGOUT_SUCCESSFULL, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
|
|||
$('#wallet-login').show(); |
|||
$('body') |
|||
.removeClass( '' ) |
|||
.addClass( 'page-login layout-full page-dark' ); |
|||
$('#wallet-core').hide(); |
|||
$('link[id=loginStyle]')[0].disabled = false; |
|||
|
|||
// Make sure these fields are unhidden.
|
|||
$('#login-welcome').text(_lang[defaultLang].INDEX.WELCOME_LOGIN); |
|||
$( |
|||
'.create-account,' + |
|||
'#register-btn,' + |
|||
'#logincoinslist' |
|||
) |
|||
.show(); |
|||
$('#logint-another-wallet').hide(); |
|||
$('#loginbtn').text(_lang[defaultLang].LOGIN.SIGN_IN); |
|||
} else { |
|||
// If something goes wrong, alert the error message that our service returned
|
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
console.log(data.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(jqXHR); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failure'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION); |
|||
} |
|||
}); |
|||
}); |
|||
}; |
|||
|
|||
var handleAddCoinLoginBtn = function() { |
|||
$('#addcoin_mdl_native_mode_login').prop('disabled', true); |
|||
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', true); |
|||
$('#addcoin_mdl_full_mode_login') |
|||
.prop('disabled', true) |
|||
.prop('checked', false); |
|||
|
|||
$('.mdl_addcoin_done_btn-login').click(function() { |
|||
ExecuteAddCoinLoginFn(); |
|||
}); |
|||
|
|||
$( '#addcoin_select_coin_mdl_options-login' ) |
|||
.change(function() { |
|||
var tmp_coin_val = $('#addcoin_select_coin_mdl_options-login').val(); |
|||
|
|||
if (tmp_coin_val !== 'KMD' || tmp_coin_val !== 'KMD' ) { |
|||
$('#addcoin_mdl_native_mode_login').prop('disabled', true); |
|||
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', true); |
|||
$('#addcoin_mdl_full_mode_login') |
|||
.prop('disabled', false) |
|||
.prop('checked', true); |
|||
} |
|||
if (tmp_coin_val == 'KMD') { |
|||
$('#addcoin_mdl_native_mode_login').prop('disabled', false); |
|||
$('#addcoin_mdl_basilisk_mode_login') |
|||
.prop('disabled', false) |
|||
.prop('checked', true); |
|||
$('#addcoin_mdl_full_mode_login').prop('disabled', true); |
|||
} |
|||
if (tmp_coin_val == 'SUPERNET' || |
|||
tmp_coin_val == 'REVS' || |
|||
tmp_coin_val == 'WLC' || |
|||
tmp_coin_val == 'DEX' || |
|||
tmp_coin_val == 'PANGEA' || |
|||
tmp_coin_val == 'JUMBLR' || |
|||
tmp_coin_val == 'BET' || |
|||
tmp_coin_val == 'CRYPTO' || |
|||
tmp_coin_val == 'HODL' || |
|||
tmp_coin_val == 'SHARK' || |
|||
tmp_coin_val == 'BOTS' || |
|||
tmp_coin_val == 'MGW' || |
|||
tmp_coin_val == 'MVP' || |
|||
tmp_coin_val == 'KV' || |
|||
tmp_coin_val == 'CEAL' || |
|||
tmp_coin_val == 'MESH' || |
|||
tmp_coin_val == 'USD' || |
|||
tmp_coin_val == 'RON' || |
|||
tmp_coin_val == 'EUR' || |
|||
tmp_coin_val == 'JPY' || |
|||
tmp_coin_val == 'GBP' || |
|||
tmp_coin_val == 'AUD' || |
|||
tmp_coin_val == 'CAD' || |
|||
tmp_coin_val == 'CHF' || |
|||
tmp_coin_val == 'NZD' || |
|||
tmp_coin_val == 'CNY' || |
|||
tmp_coin_val == 'RUB' || |
|||
tmp_coin_val == 'MXN' || |
|||
tmp_coin_val == 'BRL' || |
|||
tmp_coin_val == 'INR' || |
|||
tmp_coin_val == 'HKD' || |
|||
tmp_coin_val == 'TRY' || |
|||
tmp_coin_val == 'ZAR' || |
|||
tmp_coin_val == 'PLN' || |
|||
tmp_coin_val == 'NOK' || |
|||
tmp_coin_val == 'SEK' || |
|||
tmp_coin_val == 'DKK' || |
|||
tmp_coin_val == 'CZK' || |
|||
tmp_coin_val == 'HUF' || |
|||
tmp_coin_val == 'ILS' || |
|||
tmp_coin_val == 'KRW' || |
|||
tmp_coin_val == 'MYR' || |
|||
tmp_coin_val == 'PHP' || |
|||
tmp_coin_val == 'SGD' || |
|||
tmp_coin_val == 'THB' || |
|||
tmp_coin_val == 'BGN' || |
|||
tmp_coin_val == 'IDR' || |
|||
tmp_coin_val == 'HRK' ) { |
|||
$('#addcoin_mdl_native_mode_login').prop('disabled', false); |
|||
$('#addcoin_mdl_basilisk_mode_login') |
|||
.prop('disabled', false) |
|||
.prop('checked', true); |
|||
$('#addcoin_mdl_full_mode_login').prop('disabled', true); |
|||
} |
|||
if (tmp_coin_val == 'BTC') { |
|||
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', true); |
|||
$('#addcoin_mdl_native_mode_login').prop('disabled', true); |
|||
$('#addcoin_mdl_full_mode_login') |
|||
.prop('disabled', false) |
|||
.prop('checked', true); |
|||
} |
|||
if (tmp_coin_val == 'ZEC') { |
|||
$('#addcoin_mdl_basilisk_mode_login').prop('disabled', true); |
|||
$('#addcoin_mdl_native_mode_login').prop('disabled', false) |
|||
$('#addcoin_mdl_native_mode_login').prop('checked', true); |
|||
$('#addcoin_mdl_full_mode_login').prop('disabled', true); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
var handleAddCoinOSOptions = function() { |
|||
if ( navigator.platform == 'Win32-') { |
|||
// Conditions for Login Add Coin Dialog
|
|||
$.each($('.style-addcoin-lbl-mdl-login'), function(index, value) { |
|||
if ( index == 0 || index == 1 ) { |
|||
$(value) |
|||
.removeClass('col-lg-4 col-md-4') |
|||
.addClass('col-lg-6 col-md-6'); |
|||
} |
|||
if ( index == 2 ) { |
|||
$(value).hide(); |
|||
} |
|||
}); |
|||
|
|||
// Conditions for Dashboard Add Coin Dialog
|
|||
$.each($('.style-addcoin-lbl-mdl'), function(index, value) { |
|||
if ( index == 0 || index == 1 ) { |
|||
$(value) |
|||
.removeClass('col-lg-4 col-md-4') |
|||
.addClass('col-lg-6 col-md-6'); |
|||
} |
|||
if ( index == 2 ) { |
|||
$(value).hide(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
|
|||
return { |
|||
// main function to initiate the module
|
|||
init: function() { |
|||
// handleCoinsRunningCheck();
|
|||
handleLogin(); |
|||
handleLock(); |
|||
handleRegister(); |
|||
handleLogout(); |
|||
handleCheckLogin(); |
|||
handleLoginAnotherWallet(); |
|||
handleAddCoinLoginBtn(); |
|||
handleAddCoinOSOptions(); |
|||
} |
|||
}; |
|||
}(); |
|||
|
|||
jQuery(document).ready(function() { |
|||
Login.init(); |
|||
}); |
|||
|
|||
function ClearOnLogout(cleardata, stopinterval) { |
|||
if ( cleardata === true ) { |
|||
sessionStorage.removeItem('IguanaActiveAccount'); |
|||
} |
|||
if ( cleardata === false || cleardata === null ) { |
|||
console.log('sessionStorage data not cleared.'); |
|||
} |
|||
if ( stopinterval === true ) { |
|||
// Stop SetInterval Calls
|
|||
StopShowCoinHistory(); |
|||
StopTotalFiatValue(); |
|||
} |
|||
if ( stopinterval === false || stopinterval === null ) { |
|||
console.log('SetInterval data not cleared.'); |
|||
} |
|||
$('#wallet-login').show(); |
|||
$('body') |
|||
.removeClass( '' ) |
|||
.addClass( 'page-login layout-full page-dark' ); |
|||
$( |
|||
'#wallet-core,' + |
|||
'#logint-another-wallet' |
|||
) |
|||
.hide(); |
|||
$('link[id=loginStyle]')[0].disabled = false; |
|||
|
|||
// Make sure these fields are unhidden.
|
|||
$('#login-welcome').text(_lang[defaultLang].LOGIN.WELCOME); |
|||
$( |
|||
'#wallet-handle,' + |
|||
'.create-account,' + |
|||
'#register-btn' |
|||
) |
|||
.show(); |
|||
$('#logint-another-wallet').hide(); |
|||
$('#loginbtn').text(_lang[defaultLang].LOGIN.SIGN_IN); |
|||
} |
@ -1,85 +0,0 @@ |
|||
/****************************************************************************** |
|||
* Copyright © 2016 The Waves Core Developers. * |
|||
* * |
|||
* See the LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* Waves software, including this file, may be copied, modified, propagated, * |
|||
* or distributed except according to the terms contained in the LICENSE.txt * |
|||
* file. * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
/** |
|||
* @depends {../3rdparty/jquery-2.1.0.js} |
|||
*/ |
|||
|
|||
var PassPhraseGenerator = { |
|||
seeds: 0, |
|||
seedLimit: 512, |
|||
|
|||
push: function(seed) { |
|||
Math.seedrandom(seed, true); |
|||
this.seeds++; |
|||
}, |
|||
|
|||
isDone: function() { |
|||
if (this.seeds == this.seedLimit) { |
|||
return true; |
|||
} |
|||
return false; |
|||
}, |
|||
|
|||
percentage: function() { |
|||
return Math.round((this.seeds / this.seedLimit) * 100) |
|||
}, |
|||
|
|||
passPhrase: "", |
|||
|
|||
wordCount: 2048, |
|||
|
|||
words: ClientWordList, |
|||
|
|||
generatePassPhrase: function(bitsval) { |
|||
|
|||
var crypto = window.crypto || window.msCrypto; |
|||
|
|||
bits = bitsval; |
|||
|
|||
var random = new Uint32Array(bits / 32); |
|||
|
|||
crypto.getRandomValues(random); |
|||
|
|||
var i = 0, |
|||
l = random.length, |
|||
n = this.wordCount, |
|||
words = [], |
|||
x, w1, w2, w3; |
|||
|
|||
for (; i < l; i++) { |
|||
x = random[i]; |
|||
w1 = x % n; |
|||
w2 = (((x / n) >> 0) + w1) % n; |
|||
w3 = (((((x / n) >> 0) / n) >> 0) + w2) % n; |
|||
|
|||
words.push(this.words[w1]); |
|||
words.push(this.words[w2]); |
|||
words.push(this.words[w3]); |
|||
} |
|||
|
|||
this.passPhrase = words.join(" "); |
|||
|
|||
crypto.getRandomValues(random); |
|||
|
|||
return this.passPhrase; |
|||
}, |
|||
|
|||
reset: function() { |
|||
this.passPhrase = ""; |
|||
this.seeds = 0; |
|||
} |
|||
} |
@ -1,342 +0,0 @@ |
|||
// seedrandom.js version 2.3.3
|
|||
// Author: David Bau
|
|||
// Date: 2014 Feb 4
|
|||
//
|
|||
// Defines a method Math.seedrandom() that, when called, substitutes
|
|||
// an explicitly seeded RC4-based algorithm for Math.random(). Also
|
|||
// supports automatic seeding from local or network sources of entropy.
|
|||
// Can be used as a node.js or AMD module. Can be called with "new"
|
|||
// to create a local PRNG without changing Math.random.
|
|||
//
|
|||
// Basic usage:
|
|||
//
|
|||
// <script src=http://davidbau.com/encode/seedrandom.min.js></script>
|
|||
//
|
|||
// Math.seedrandom('yay.'); // Sets Math.random to a function that is
|
|||
// // initialized using the given explicit seed.
|
|||
//
|
|||
// Math.seedrandom(); // Sets Math.random to a function that is
|
|||
// // seeded using the current time, dom state,
|
|||
// // and other accumulated local entropy.
|
|||
// // The generated seed string is returned.
|
|||
//
|
|||
// Math.seedrandom('yowza.', true);
|
|||
// // Seeds using the given explicit seed mixed
|
|||
// // together with accumulated entropy.
|
|||
//
|
|||
// <script src="https://jsonlib.appspot.com/urandom?callback=Math.seedrandom">
|
|||
// </script> <!-- Seeds using urandom bits from a server. -->
|
|||
//
|
|||
// Math.seedrandom("hello."); // Behavior is the same everywhere:
|
|||
// document.write(Math.random()); // Always 0.9282578795792454
|
|||
// document.write(Math.random()); // Always 0.3752569768646784
|
|||
//
|
|||
// Math.seedrandom can be used as a constructor to return a seeded PRNG
|
|||
// that is independent of Math.random:
|
|||
//
|
|||
// var myrng = new Math.seedrandom('yay.');
|
|||
// var n = myrng(); // Using "new" creates a local prng without
|
|||
// // altering Math.random.
|
|||
//
|
|||
// When used as a module, seedrandom is a function that returns a seeded
|
|||
// PRNG instance without altering Math.random:
|
|||
//
|
|||
// // With node.js (after "npm install seedrandom"):
|
|||
// var seedrandom = require('seedrandom');
|
|||
// var rng = seedrandom('hello.');
|
|||
// console.log(rng()); // always 0.9282578795792454
|
|||
//
|
|||
// // With require.js or other AMD loader:
|
|||
// require(['seedrandom'], function(seedrandom) {
|
|||
// var rng = seedrandom('hello.');
|
|||
// console.log(rng()); // always 0.9282578795792454
|
|||
// });
|
|||
//
|
|||
// More examples:
|
|||
//
|
|||
// var seed = Math.seedrandom(); // Use prng with an automatic seed.
|
|||
// document.write(Math.random()); // Pretty much unpredictable x.
|
|||
//
|
|||
// var rng = new Math.seedrandom(seed); // A new prng with the same seed.
|
|||
// document.write(rng()); // Repeat the 'unpredictable' x.
|
|||
//
|
|||
// function reseed(event, count) { // Define a custom entropy collector.
|
|||
// var t = [];
|
|||
// function w(e) {
|
|||
// t.push([e.pageX, e.pageY, +new Date]);
|
|||
// if (t.length < count) { return; }
|
|||
// document.removeEventListener(event, w);
|
|||
// Math.seedrandom(t, true); // Mix in any previous entropy.
|
|||
// }
|
|||
// document.addEventListener(event, w);
|
|||
// }
|
|||
// reseed('mousemove', 100); // Reseed after 100 mouse moves.
|
|||
//
|
|||
// The callback third arg can be used to get both the prng and the seed.
|
|||
// The following returns both an autoseeded prng and the seed as an object,
|
|||
// without mutating Math.random:
|
|||
//
|
|||
// var obj = Math.seedrandom(null, false, function(prng, seed) {
|
|||
// return { random: prng, seed: seed };
|
|||
// });
|
|||
//
|
|||
// Version notes:
|
|||
//
|
|||
// The random number sequence is the same as version 1.0 for string seeds.
|
|||
// * Version 2.0 changed the sequence for non-string seeds.
|
|||
// * Version 2.1 speeds seeding and uses window.crypto to autoseed if present.
|
|||
// * Version 2.2 alters non-crypto autoseeding to sweep up entropy from plugins.
|
|||
// * Version 2.3 adds support for "new", module loading, and a null seed arg.
|
|||
// * Version 2.3.1 adds a build environment, module packaging, and tests.
|
|||
// * Version 2.3.3 fixes bugs on IE8, and switches to MIT license.
|
|||
//
|
|||
// The standard ARC4 key scheduler cycles short keys, which means that
|
|||
// seedrandom('ab') is equivalent to seedrandom('abab') and 'ababab'.
|
|||
// Therefore it is a good idea to add a terminator to avoid trivial
|
|||
// equivalences on short string seeds, e.g., Math.seedrandom(str + '\0').
|
|||
// Starting with version 2.0, a terminator is added automatically for
|
|||
// non-string seeds, so seeding with the number 111 is the same as seeding
|
|||
// with '111\0'.
|
|||
//
|
|||
// When seedrandom() is called with zero args or a null seed, it uses a
|
|||
// seed drawn from the browser crypto object if present. If there is no
|
|||
// crypto support, seedrandom() uses the current time, the native rng,
|
|||
// and a walk of several DOM objects to collect a few bits of entropy.
|
|||
//
|
|||
// Each time the one- or two-argument forms of seedrandom are called,
|
|||
// entropy from the passed seed is accumulated in a pool to help generate
|
|||
// future seeds for the zero- and two-argument forms of seedrandom.
|
|||
//
|
|||
// On speed - This javascript implementation of Math.random() is several
|
|||
// times slower than the built-in Math.random() because it is not native
|
|||
// code, but that is typically fast enough. Some details (timings on
|
|||
// Chrome 25 on a 2010 vintage macbook):
|
|||
//
|
|||
// seeded Math.random() - avg less than 0.0002 milliseconds per call
|
|||
// seedrandom('explicit.') - avg less than 0.2 milliseconds per call
|
|||
// seedrandom('explicit.', true) - avg less than 0.2 milliseconds per call
|
|||
// seedrandom() with crypto - avg less than 0.2 milliseconds per call
|
|||
//
|
|||
// Autoseeding without crypto is somewhat slower, about 20-30 milliseconds on
|
|||
// a 2012 windows 7 1.5ghz i5 laptop, as seen on Firefox 19, IE 10, and Opera.
|
|||
// Seeded rng calls themselves are fast across these browsers, with slowest
|
|||
// numbers on Opera at about 0.0005 ms per seeded Math.random().
|
|||
//
|
|||
// LICENSE (BSD):
|
|||
//
|
|||
// Copyright 2013 David Bau, all rights reserved.
|
|||
//
|
|||
// Redistribution and use in source and binary forms, with or without
|
|||
// modification, are permitted provided that the following conditions are met:
|
|||
//
|
|||
// 1. Redistributions of source code must retain the above copyright
|
|||
// notice, this list of conditions and the following disclaimer.
|
|||
//
|
|||
// 2. Redistributions in binary form must reproduce the above copyright
|
|||
// notice, this list of conditions and the following disclaimer in the
|
|||
// documentation and/or other materials provided with the distribution.
|
|||
//
|
|||
// 3. Neither the name of this module nor the names of its contributors may
|
|||
// be used to endorse or promote products derived from this software
|
|||
// without specific prior written permission.
|
|||
//
|
|||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
//
|
|||
|
|||
/** |
|||
* All code is in an anonymous closure to keep the global namespace clean. |
|||
*/ |
|||
(function ( |
|||
global, pool, math, width, chunks, digits, module, define, rngname) { |
|||
|
|||
//
|
|||
// The following constants are related to IEEE 754 limits.
|
|||
//
|
|||
var startdenom = math.pow(width, chunks), |
|||
significance = math.pow(2, digits), |
|||
overflow = significance * 2, |
|||
mask = width - 1, |
|||
|
|||
//
|
|||
// seedrandom()
|
|||
// This is the seedrandom function described above.
|
|||
//
|
|||
impl = math['seed' + rngname] = function(seed, use_entropy, callback) { |
|||
var key = []; |
|||
|
|||
// Flatten the seed string or build one from local entropy if needed.
|
|||
var shortseed = mixkey(flatten( |
|||
use_entropy ? [seed, tostring(pool)] : |
|||
(seed == null) ? autoseed() : seed, 3), key); |
|||
|
|||
// Use the seed to initialize an ARC4 generator.
|
|||
var arc4 = new ARC4(key); |
|||
|
|||
// Mix the randomness into accumulated entropy.
|
|||
mixkey(tostring(arc4.S), pool); |
|||
|
|||
// Calling convention: what to return as a function of prng, seed, is_math.
|
|||
return (callback || |
|||
// If called as a method of Math (Math.seedrandom()), mutate Math.random
|
|||
// because that is how seedrandom.js has worked since v1.0. Otherwise,
|
|||
// it is a newer calling convention, so return the prng directly.
|
|||
function(prng, seed, is_math_call) { |
|||
if (is_math_call) { math[rngname] = prng; return seed; } |
|||
else return prng; |
|||
})( |
|||
|
|||
// This function returns a random double in [0, 1) that contains
|
|||
// randomness in every bit of the mantissa of the IEEE 754 value.
|
|||
function() { |
|||
var n = arc4.g(chunks), // Start with a numerator n < 2 ^ 48
|
|||
d = startdenom, // and denominator d = 2 ^ 48.
|
|||
x = 0; // and no 'extra last byte'.
|
|||
while (n < significance) { // Fill up all significant digits by
|
|||
n = (n + x) * width; // shifting numerator and
|
|||
d *= width; // denominator and generating a
|
|||
x = arc4.g(1); // new least-significant-byte.
|
|||
} |
|||
while (n >= overflow) { // To avoid rounding up, before adding
|
|||
n /= 2; // last byte, shift everything
|
|||
d /= 2; // right using integer math until
|
|||
x >>>= 1; // we have exactly the desired bits.
|
|||
} |
|||
return (n + x) / d; // Form the number within [0, 1).
|
|||
}, shortseed, this == math); |
|||
}; |
|||
|
|||
//
|
|||
// ARC4
|
|||
//
|
|||
// An ARC4 implementation. The constructor takes a key in the form of
|
|||
// an array of at most (width) integers that should be 0 <= x < (width).
|
|||
//
|
|||
// The g(count) method returns a pseudorandom integer that concatenates
|
|||
// the next (count) outputs from ARC4. Its return value is a number x
|
|||
// that is in the range 0 <= x < (width ^ count).
|
|||
//
|
|||
/** @constructor */ |
|||
function ARC4(key) { |
|||
var t, keylen = key.length, |
|||
me = this, i = 0, j = me.i = me.j = 0, s = me.S = []; |
|||
|
|||
// The empty key [] is treated as [0].
|
|||
if (!keylen) { key = [keylen++]; } |
|||
|
|||
// Set up S using the standard key scheduling algorithm.
|
|||
while (i < width) { |
|||
s[i] = i++; |
|||
} |
|||
for (i = 0; i < width; i++) { |
|||
s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))]; |
|||
s[j] = t; |
|||
} |
|||
|
|||
// The "g" method returns the next (count) outputs as one number.
|
|||
(me.g = function(count) { |
|||
// Using instance members instead of closure state nearly doubles speed.
|
|||
var t, r = 0, |
|||
i = me.i, j = me.j, s = me.S; |
|||
while (count--) { |
|||
t = s[i = mask & (i + 1)]; |
|||
r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))]; |
|||
} |
|||
me.i = i; me.j = j; |
|||
return r; |
|||
// For robust unpredictability discard an initial batch of values.
|
|||
// See http://www.rsa.com/rsalabs/node.asp?id=2009
|
|||
})(width); |
|||
} |
|||
|
|||
//
|
|||
// flatten()
|
|||
// Converts an object tree to nested arrays of strings.
|
|||
//
|
|||
function flatten(obj, depth) { |
|||
var result = [], typ = (typeof obj), prop; |
|||
if (depth && typ == 'object') { |
|||
for (prop in obj) { |
|||
try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {} |
|||
} |
|||
} |
|||
return (result.length ? result : typ == 'string' ? obj : obj + '\0'); |
|||
} |
|||
|
|||
//
|
|||
// mixkey()
|
|||
// Mixes a string seed into a key that is an array of integers, and
|
|||
// returns a shortened string seed that is equivalent to the result key.
|
|||
//
|
|||
function mixkey(seed, key) { |
|||
var stringseed = seed + '', smear, j = 0; |
|||
while (j < stringseed.length) { |
|||
key[mask & j] = |
|||
mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++)); |
|||
} |
|||
return tostring(key); |
|||
} |
|||
|
|||
//
|
|||
// autoseed()
|
|||
// Returns an object for autoseeding, using window.crypto if available.
|
|||
//
|
|||
/** @param {Uint8Array|Navigator=} seed */ |
|||
function autoseed(seed) { |
|||
try { |
|||
global.crypto.getRandomValues(seed = new Uint8Array(width)); |
|||
return tostring(seed); |
|||
} catch (e) { |
|||
return [+new Date, global, (seed = global.navigator) && seed.plugins, |
|||
global.screen, tostring(pool)]; |
|||
} |
|||
} |
|||
|
|||
//
|
|||
// tostring()
|
|||
// Converts an array of charcodes to a string
|
|||
//
|
|||
function tostring(a) { |
|||
return String.fromCharCode.apply(0, a); |
|||
} |
|||
|
|||
//
|
|||
// When seedrandom.js is loaded, we immediately mix a few bits
|
|||
// from the built-in RNG into the entropy pool. Because we do
|
|||
// not want to intefere with determinstic PRNG state later,
|
|||
// seedrandom will not call math.random on its own again after
|
|||
// initialization.
|
|||
//
|
|||
mixkey(math[rngname](), pool); |
|||
|
|||
//
|
|||
// Nodejs and AMD support: export the implemenation as a module using
|
|||
// either convention.
|
|||
//
|
|||
if (module && module.exports) { |
|||
module.exports = impl; |
|||
} else if (define && define.amd) { |
|||
define(function() { return impl; }); |
|||
} |
|||
|
|||
// End anonymous scope, and pass initial values.
|
|||
})( |
|||
this, // global window object
|
|||
[], // pool: entropy pool starts empty
|
|||
Math, // math: package containing random, pow, and seedrandom
|
|||
256, // width: each RC4 output is 0 <= x < 256
|
|||
6, // chunks: at least six RC4 outputs for each double
|
|||
52, // digits: there are 52 significant digits in a double
|
|||
(typeof module) == 'object' && module, // present in node.js
|
|||
(typeof define) == 'function' && define, // present with an AMD loader
|
|||
'random'// rngname: name for Math.random and Math.seedrandom
|
|||
); |
@ -1,791 +0,0 @@ |
|||
// DOM Ready =============================================================
|
|||
$(document).ready(function() { |
|||
$('#section-dashboard').show(); |
|||
$( |
|||
'#section-easydex,' + |
|||
'#section-jumblr,' + |
|||
'#section-extcoin,' + |
|||
'#section-zcash,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-iguana-wallet-settings,' + |
|||
'#section-about-iguana' |
|||
) |
|||
.hide(); |
|||
$('#nav-dashboard') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$( |
|||
'#nav-easydex,' + |
|||
'#nav-jumblr,' + |
|||
'#nav-komodo-wallet,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-iguana-atomic-explorer,' + |
|||
'#nav-iguana-wallet-settings,' + |
|||
'#nav-about-iguana' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
$('.header-easydex-section').text(_lang[defaultLang].INDEX.DASHBOARD); |
|||
|
|||
removeKMDWalletStyle(); |
|||
removeZECWalletStyle(); |
|||
removeJumblrStyle(); |
|||
removeACPAXWalletStyle(); |
|||
CommonSidebarActionsSet01(); |
|||
applyDashboardStyle(); |
|||
}); |
|||
|
|||
$('#nav-dashboard').on('click', function() { |
|||
$('#section-dashboard').show(); |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|||
if (active_edexcoin !== 'COIN') { |
|||
$('#header-dashboard').show(); |
|||
} |
|||
$( |
|||
'#section-easydex,' + |
|||
'#section-jumblr,' + |
|||
'#section-extcoin,' + |
|||
'#section-zcash,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-iguana-wallet-settings,' + |
|||
'#section-about-iguana' |
|||
) |
|||
.hide(); |
|||
$('#nav-dashboard') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$( |
|||
'#nav-easydex,' + |
|||
'#nav-jumblr,' + |
|||
'#nav-komodo-wallet,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-iguana-atomic-explorer,' + |
|||
'#nav-iguana-wallet-settings,' + |
|||
'#nav-about-iguana' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
$('.header-easydex-section').text(_lang[defaultLang].INDEX.DASHBOARD); |
|||
|
|||
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active'); }); |
|||
$(this.parentElement).addClass('active'); |
|||
removeKMDWalletStyle(); |
|||
removeZECWalletStyle(); |
|||
removeJumblrStyle(); |
|||
removeACPAXWalletStyle(); |
|||
CommonSidebarActionsSet011(); |
|||
applyDashboardStyle(); |
|||
}); |
|||
|
|||
$('#nav-easydex').on('click', function() { |
|||
$( |
|||
'#header-dashboard,' + |
|||
'#section-dashboard,' + |
|||
'#section-jumblr,' + |
|||
'#section-extcoin,' + |
|||
'#section-zcash,' + |
|||
'#section-about-iguana,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-iguana-wallet-settings' |
|||
) |
|||
.hide(); |
|||
$('#section-easydex').show(); |
|||
$('#nav-easydex') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$( |
|||
'#nav-dashboard,' + |
|||
'#nav-komodo-wallet,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-iguana-atomic-explorer,' + |
|||
'#nav-iguana-wallet-settings,' + |
|||
'#nav-about-iguana' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
$('.page-header-bordered h1').text('EasyDEX'); |
|||
$('.header-easydex-section').text(_lang[defaultLang].SIDEBAR.EDEX_MOTTO); |
|||
|
|||
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active'); }); |
|||
$(this.parentElement).addClass('active'); |
|||
removeKMDWalletStyle(); |
|||
removeZECWalletStyle(); |
|||
removeJumblrStyle(); |
|||
removeACPAXWalletStyle(); |
|||
CommonSidebarActionsSet02(); |
|||
removeDashboardStyle(); |
|||
}); |
|||
|
|||
$('#nav-jumblr').on('click', function() { |
|||
$( |
|||
'#header-dashboard,' + |
|||
'#section-dashboard,' + |
|||
'#section-easydex,' + |
|||
'#section-extcoin,' + |
|||
'#section-zcash,' + |
|||
'#section-about-iguana,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-iguana-wallet-settings' |
|||
) |
|||
.hide(); |
|||
$('#section-jumblr').show(); |
|||
$( |
|||
'#nav-dashboard,' + |
|||
'#nav-easydex,' + |
|||
'#nav-komodo-wallet,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-iguana-atomic-explorer,' + |
|||
'#nav-iguana-wallet-settings,' + |
|||
'#nav-about-iguana' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
$('#nav-jumblr') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$('.page-header-bordered h1').text('Jumblr') |
|||
|
|||
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active'); }); |
|||
$(this.parentElement).addClass('active'); |
|||
removeKMDWalletStyle(); |
|||
removeZECWalletStyle(); |
|||
removeACPAXWalletStyle(); |
|||
CommonSidebarActionsSet02(); |
|||
removeDashboardStyle(); |
|||
applyJumblrStyle() |
|||
}); |
|||
|
|||
$('#nav-komodo-wallet').on('click', function() { |
|||
$( |
|||
'#header-dashboard,' + |
|||
'#section-dashboard,' + |
|||
'#section-easydex,' + |
|||
'#section-jumblr,' + |
|||
'#section-zcash,' + |
|||
'#section-about-iguana,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-iguana-wallet-settings' |
|||
) |
|||
.hide(); |
|||
$('#section-extcoin').show(); |
|||
$( |
|||
'#nav-dashboard,' + |
|||
'#nav-easydex,' + |
|||
'#nav-jumblr,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-iguana-atomic-explorer,' + |
|||
'#nav-iguana-wallet-settings,' + |
|||
'#nav-about-iguana' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
$('#nav-komodo-wallet') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
|
|||
$.each($('[data-extcoin]'), function(index, value) { |
|||
$('[data-extcoin]').attr('data-extcoin', 'KMD'); |
|||
$('[data-extcoin="KMD"]'); |
|||
}); |
|||
$.each($('[data-extcoinname]'), function(index, value) { |
|||
$('[data-extcoinname]').text('KMD'); |
|||
$('[data-extcoinname="KMD"]'); |
|||
}); |
|||
$.each($('[data-extcointitle]'), function(index, value) { |
|||
$('[data-extcointitle]').text('Komodo'); |
|||
$('[data-extcointitle="Komodo"]'); |
|||
}); |
|||
KMDWalletDashboard.init(); // Initiate Komodo Dashboard sript
|
|||
RunKMDInitFunctions(); |
|||
removeJumblrStyle(); |
|||
removeACPAXWalletStyle(); |
|||
applyKMDWalletStyle(); |
|||
CommonSidebarActionsSet02(); |
|||
removeDashboardStyle(); |
|||
}); |
|||
|
|||
$('#nav-zcash-wallet').on('click', function() { |
|||
NProgress.done(true); |
|||
NProgress.configure({ |
|||
template: templates.nprogressBar |
|||
}); |
|||
NProgress.start(); |
|||
$( |
|||
'#header-dashboard,' + |
|||
'#section-dashboard,' + |
|||
'#section-easydex,' + |
|||
'#section-jumblr,' + |
|||
'#section-extcoin,' + |
|||
'#section-about-iguana,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-iguana-wallet-settings' |
|||
) |
|||
.hide(); |
|||
$('#section-extcoin').show(); |
|||
$( |
|||
'#nav-dashboard,' + |
|||
'#nav-easydex,' + |
|||
'#nav-jumblr,' + |
|||
'#nav-komodo-wallet,' + |
|||
'#nav-iguana-atomic-explorer,' + |
|||
'#nav-iguana-wallet-settings,' + |
|||
'#nav-about-iguana' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
$('#nav-zcash-wallet') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$('.header-easydex-section').text(_lang[defaultLang].INDEX.ZC_WALLET); |
|||
|
|||
$.each($('[data-extcoin]'), function(index, value) { |
|||
$('[data-extcoin]').attr('data-extcoin', 'ZEC'); |
|||
$('[data-extcoin="ZEC"]'); |
|||
}); |
|||
$.each($('[data-extcoinname]'), function(index, value) { |
|||
$('[data-extcoinname]').text('ZEC'); |
|||
$('[data-extcoinname="ZEC"]'); |
|||
}); |
|||
$.each($('[data-extcointitle]'), function(index, value) { |
|||
$('[data-extcointitle]').text('Zcash'); |
|||
$('[data-extcointitle="Zcash"]'); |
|||
}); |
|||
|
|||
KMDWalletDashboard.init(); // Initiate Komodo Dashbaord sript
|
|||
RunKMDInitFunctions(); |
|||
applyZECWalletStyle(); |
|||
CommonSidebarActionsSet02(); |
|||
removeDashboardStyle(); |
|||
NProgress.done(); |
|||
}); |
|||
|
|||
$('#nav-iguana-atomic-explorer').on('click', function() { |
|||
$( |
|||
'#header-dashboard,' + |
|||
'#section-dashboard,' + |
|||
'#section-easydex,' + |
|||
'#section-jumblr,' + |
|||
'#section-extcoin,' + |
|||
'#section-zcash,' + |
|||
'#section-iguana-wallet-settings,' + |
|||
'#section-about-iguana' |
|||
) |
|||
.hide(); |
|||
$('#section-iguana-atomic-explorer').show(); |
|||
$( |
|||
'#nav-dashboard,' + |
|||
'#nav-easydex,' + |
|||
'#nav-jumblr,' + |
|||
'#nav-komodo-wallet,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-about-iguana,' + |
|||
'#nav-iguana-wallet-settings' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
$('#nav-iguana-atomic-explorer') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$('.header-easydex-section').text('Atomic Explorer'); |
|||
|
|||
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active'); }); |
|||
$(this.parentElement).addClass('active'); |
|||
removeKMDWalletStyle(); |
|||
removeZECWalletStyle(); |
|||
removeJumblrStyle(); |
|||
removeACPAXWalletStyle(); |
|||
CommonSidebarActionsSet02(); |
|||
removeDashboardStyle(); |
|||
$('#easydex-header-div').hide(); |
|||
}); |
|||
|
|||
$('#nav-iguana-wallet-settings').on('click', function() { |
|||
$( |
|||
'#section-dashboard,' + |
|||
'#header-dashboard,' + |
|||
'#section-easydex,' + |
|||
'#section-jumblr,' + |
|||
'#section-extcoin,' + |
|||
'#section-zcash,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-about-iguana' |
|||
) |
|||
.hide(); |
|||
$('#section-iguana-wallet-settings').show(); |
|||
$( |
|||
'#nav-dashboard,' + |
|||
'#nav-easydex,' + |
|||
'#nav-jumblr,' + |
|||
'#nav-komodo-wallet,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-about-iguana,' + |
|||
'#nav-iguana-atomic-explorer' |
|||
) |
|||
.removeClass( 'active open' ).addClass( '' ); |
|||
$('#nav-iguana-wallet-settings') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
removeKMDWalletStyle(); |
|||
removeZECWalletStyle(); |
|||
removeJumblrStyle(); |
|||
removeACPAXWalletStyle(); |
|||
Settings_ShowWalletInfo(); // Execute this function from walletsettings.js file
|
|||
CommonSidebarActionsSet02(); |
|||
removeDashboardStyle(); |
|||
$('#easydex-header-div').hide(); |
|||
}); |
|||
|
|||
$('#nav-about-iguana').on('click', function() { |
|||
$( |
|||
'#header-dashboard,' + |
|||
'#section-dashboard,' + |
|||
'#section-easydex,' + |
|||
'#section-jumblr,' + |
|||
'#section-extcoin,' + |
|||
'#section-zcash,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-iguana-wallet-settings' |
|||
) |
|||
.hide(); |
|||
$('#section-about-iguana').show(); |
|||
$( |
|||
'#nav-dashboard,' + |
|||
'#nav-easydex,' + |
|||
'#nav-jumblr,' + |
|||
'#nav-komodo-wallet,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-iguana-atomic-explorer,' + |
|||
'#nav-iguana-wallet-settings' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
$('#nav-about-iguana') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$('.header-easydex-section').text('About Iguana'); |
|||
removeKMDWalletStyle(); |
|||
removeZECWalletStyle(); |
|||
removeJumblrStyle(); |
|||
removeACPAXWalletStyle(); |
|||
CommonSidebarActionsSet02(); |
|||
removeDashboardStyle(); |
|||
$('#easydex-header-div').hide(); |
|||
}); |
|||
|
|||
// ASSETCHAINS AND PAXCHAINS SIDE MENU
|
|||
|
|||
function assetchain_pax_menu_actions(coin) { |
|||
$( |
|||
'#header-dashboard,' + |
|||
'#section-dashboard,' + |
|||
'#section-easydex,' + |
|||
'#section-jumblr,' + |
|||
'#section-zcash,' + |
|||
'#section-about-iguana,' + |
|||
'#section-iguana-atomic-explorer,' + |
|||
'#section-iguana-wallet-settings' |
|||
) |
|||
.hide(); |
|||
$('#section-extcoin').show(); |
|||
$('#nav-komodo-wallet') |
|||
.removeClass( '' ) |
|||
.addClass( 'active open' ); |
|||
$( |
|||
'#nav-dashboard,' + |
|||
'#nav-easydex,' + |
|||
'#nav-jumblr,' + |
|||
'#nav-zcash-wallet,' + |
|||
'#nav-iguana-atomic-explorer,' + |
|||
'#nav-iguana-wallet-settings,' + |
|||
'#nav-about-iguana' |
|||
) |
|||
.removeClass( 'active open' ) |
|||
.addClass( '' ); |
|||
|
|||
$.each($('[data-extcoin]'), function(index, value) { |
|||
$('[data-extcoin]').attr('data-extcoin', coin); |
|||
$('[data-extcoin=' + coin + ']'); |
|||
}); |
|||
$.each($('[data-extcoinname]'), function(index, value) { |
|||
$('[data-extcoinname]').text(coin); |
|||
$('[data-extcoinname=' + coin + ']'); |
|||
}); |
|||
$.each($('[data-extcointitle]'), function(index, value) { |
|||
$('[data-extcointitle]').text(coin); |
|||
$('[data-extcointitle=' + coin + ']'); |
|||
}); |
|||
|
|||
KMDWalletDashboard.init(); // Initiate Komodo Dashboard sript
|
|||
RunKMDInitFunctions(); |
|||
removeJumblrStyle(); |
|||
removeACPAXWalletStyle(); |
|||
applyACPAXWalletStyle() |
|||
CommonSidebarActionsSet02(); |
|||
removeDashboardStyle(); |
|||
|
|||
function renderAssetGFX(imgSrcName, imgBgName, _coin) { |
|||
$('.header-easydex-section') |
|||
.html('<img src="assets/images/native/' + imgSrcName + '_header_title_logo.png"> <span style="font-size: 35px; vertical-align: middle">' + _coin + '</span>'); |
|||
$('#easydex-header-div').css('background-image', 'url("assets/images/bg/' + imgBgName + '_transparent_header_bg.png")'); |
|||
} |
|||
|
|||
switch (coin) { |
|||
case 'SUPERNET': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'REVS': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'WLC': |
|||
renderAssetGFX('wireless', 'wireless', 'Wireless (WLC)'); |
|||
break; |
|||
case 'PANGEA': |
|||
renderAssetGFX('pangea', 'jumblr', coin); |
|||
break; |
|||
case 'DEX': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'JUMBLR': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'BET': |
|||
renderAssetGFX('bet', 'bet', coin); |
|||
break; |
|||
case 'CRYPTO': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'HODL': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'SHARK': |
|||
renderAssetGFX('shark', 'shark', coin); |
|||
break; |
|||
case 'BOTS': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'MGW': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'MVP': |
|||
renderAssetGFX('mvp', 'mvp', coin); |
|||
break; |
|||
case 'KV': |
|||
renderAssetGFX('supernet', 'jumblr', coin); |
|||
break; |
|||
case 'CEAL': |
|||
renderAssetGFX('ceal', 'ceal', coin); |
|||
break; |
|||
case 'MESH': |
|||
renderAssetGFX('mesh', 'mesh', 'SuperMesh (MESH)'); |
|||
break; |
|||
case 'BTC': |
|||
renderAssetGFX('btc', 'btc', '(BTC)'); |
|||
break; |
|||
case 'USD': |
|||
renderAssetGFX('usd', 'usd', 'US Dollar (USD)'); |
|||
break; |
|||
case 'RON': |
|||
renderAssetGFX('ron', 'ron', 'Romanian Leu (RON)'); |
|||
break; |
|||
case 'EUR': |
|||
renderAssetGFX('eur', 'eur', 'Euro (EUR)'); |
|||
break; |
|||
case 'JPY': |
|||
renderAssetGFX('jpy', 'jpy', 'Japanese Yen (JPY)'); |
|||
break; |
|||
case 'GBP': |
|||
renderAssetGFX('gbp', 'gbp', 'British Pound (GBP)'); |
|||
break; |
|||
case 'AUD': |
|||
renderAssetGFX('aud', 'aud', 'Australian Dollar (AUD)'); |
|||
break; |
|||
case 'CAD': |
|||
renderAssetGFX('cad', 'cad', 'Canadian Dollar (CAD)'); |
|||
break; |
|||
case 'CHF': |
|||
renderAssetGFX('chf', 'chf', 'Swiss Franc (CHF)'); |
|||
break; |
|||
case 'NZD': |
|||
renderAssetGFX('nzd', 'nzd', 'New Zealand Dollar (NZD)'); |
|||
break; |
|||
case 'CNY': |
|||
renderAssetGFX('cny', 'cny', 'Chinese Yuan (CNY)'); |
|||
break; |
|||
case 'RUB': |
|||
renderAssetGFX('rub', 'rub', 'Russian Ruble (RUB)'); |
|||
break; |
|||
case 'MXN': |
|||
renderAssetGFX('mxn', 'mxn', 'Mexican Peso (MXN)'); |
|||
break; |
|||
case 'BRL': |
|||
renderAssetGFX('brl', 'brl', 'Brazilian Real (BRL)'); |
|||
break; |
|||
case 'INR': |
|||
renderAssetGFX('inr', 'inr', 'Indian Rupee (INR)'); |
|||
break; |
|||
case 'HKD': |
|||
renderAssetGFX('hkd', 'hkd', 'Hong Kong Dollar (HKD)'); |
|||
break; |
|||
case 'TRY': |
|||
renderAssetGFX('try', 'try', 'Turkish Lira (TRY)'); |
|||
break; |
|||
case 'ZAR': |
|||
renderAssetGFX('zar', 'zar', 'South African Rand (ZAR)'); |
|||
break; |
|||
case 'PLN': |
|||
renderAssetGFX('pln', 'pln', 'Polish Zloty (PLN)'); |
|||
break; |
|||
case 'NOK': |
|||
renderAssetGFX('nok', 'nok', 'Norwegian Krone (NOK)'); |
|||
break; |
|||
case 'SEK': |
|||
renderAssetGFX('sek', 'sek', 'Swedish Krona (SEK)'); |
|||
break; |
|||
case 'DKK': |
|||
renderAssetGFX('dkk', 'dkk', 'Danish Krone (DKK)'); |
|||
break; |
|||
case 'CZK': |
|||
renderAssetGFX('czk', 'czk', 'Czech Koruna (CZK)'); |
|||
break; |
|||
case 'HUF': |
|||
renderAssetGFX('huf', 'huf', 'Hungarian Forint (HUF)'); |
|||
break; |
|||
case 'ILS': |
|||
renderAssetGFX('ils', 'ils', 'Israeli Shekel (ILS)'); |
|||
break; |
|||
case 'KRW': |
|||
renderAssetGFX('krw', 'krw', 'Korean Won (KRW)'); |
|||
break; |
|||
case 'MYR': |
|||
renderAssetGFX('myr', 'myr', 'Malaysian Ringgit (MYR)'); |
|||
break; |
|||
case 'PHP': |
|||
renderAssetGFX('php', 'php', 'Philippine Peso (PHP)'); |
|||
break; |
|||
case 'SGD': |
|||
renderAssetGFX('sgd', 'sgd', 'Singapore Dollar (SGD)'); |
|||
break; |
|||
case 'THB': |
|||
renderAssetGFX('thb', 'thb', 'Thai Baht (THB)'); |
|||
break; |
|||
case 'BGN': |
|||
renderAssetGFX('bgn', 'bgn', 'Bulgarian Lev (BGN)'); |
|||
break; |
|||
case 'IDR': |
|||
renderAssetGFX('idr', 'idr', 'Indonesian Rupiah (IDR)'); |
|||
break; |
|||
case 'HRK': |
|||
renderAssetGFX('hrk', 'hrk', 'Croatian Kuna (HRK)'); |
|||
break; |
|||
default: |
|||
$('.header-easydex-section').html('<span style="font-size: 35px; vertical-align: middle">' + coin + '</span>'); |
|||
break; |
|||
} |
|||
} |
|||
|
|||
// END ASSETCHAINS AND PAXCHAINS SIDE MENU
|
|||
|
|||
function CommonSidebarActionsSet01() { |
|||
sessionStorage.setItem('DashboardActions', 'start'); |
|||
sessionStorage.setItem('NativeWalletActions', 'stop'); |
|||
$('#wifkeys_passphrase').val(''); |
|||
$('#wif-priv-keys').html(''); |
|||
} |
|||
|
|||
function CommonSidebarActionsSet011() { |
|||
sessionStorage.setItem('DashboardActions', 'start'); |
|||
sessionStorage.setItem('NativeWalletActions', 'stop'); |
|||
$('#wifkeys_passphrase').val(''); |
|||
$('#wif-priv-keys').html(''); |
|||
} |
|||
|
|||
function CommonSidebarActionsSet02() { |
|||
sessionStorage.setItem('DashboardActions', 'stop'); |
|||
$('#wifkeys_passphrase').val(''); |
|||
$('#wif-priv-keys').html(''); |
|||
} |
|||
|
|||
function applyKMDWalletStyle() { |
|||
$('.header-easydex-section').html('<img src="assets/images/native/kmd_header_title_logo.png">'); |
|||
$('.page-title').hide(); |
|||
$('#easydex-header-div').css({ |
|||
'background-image': 'url("assets/images/bg/kmd_transparent_header_bg.png")', |
|||
'background-repeat': 'no-repeat', |
|||
'background-position': '0%' |
|||
}); |
|||
$('#easydex_kmd_wallet_actions_header').show(); |
|||
$( |
|||
'#easydex_acpax_wallet_actions_header,' + |
|||
'#easydex_zec_wallet_actions_header,' + |
|||
'#jumblr_actions_header,' + |
|||
'#easydex_btc_btcd_balances_header' |
|||
) |
|||
.hide(); |
|||
sessionStorage.setItem('NativeWalletActions', 'start'); |
|||
getTotalKMDBalance(); |
|||
} |
|||
|
|||
function removeKMDWalletStyle() { |
|||
$('.page-title').show(); |
|||
$('#easydex-header-div').removeAttr( 'style' ); |
|||
$( |
|||
'#easydex_acpax_wallet_actions_header,' + |
|||
'#easydex_kmd_wallet_actions_header,' + |
|||
'#easydex_zec_wallet_actions_header,' + |
|||
'#jumblr_actions_header,' + |
|||
'#easydex_btc_btcd_balances_header' |
|||
) |
|||
.hide(); |
|||
sessionStorage.setItem('NativeWalletActions', 'stop'); |
|||
} |
|||
|
|||
function applyZECWalletStyle() { |
|||
$('.header-easydex-section').html('<img src="assets/images/native/zec_header_title_logo.png">'); |
|||
$('.page-title').hide(); |
|||
$('#easydex-header-div').css({ |
|||
'background-image': 'url("assets/images/bg/zec_transparent_header_bg.png")', |
|||
'background-repeat': 'no-repeat', |
|||
'background-position': '0%' |
|||
}); |
|||
$('#easydex_zec_wallet_actions_header').show(); |
|||
$( |
|||
'#easydex_acpax_wallet_actions_header,' + |
|||
'#easydex_kmd_wallet_actions_header,' + |
|||
'#jumblr_actions_header,' + |
|||
'#easydex_btc_btcd_balances_header' |
|||
) |
|||
.hide(); |
|||
sessionStorage.setItem('NativeWalletActions', 'start'); |
|||
getTotalKMDBalance(); |
|||
} |
|||
|
|||
function removeZECWalletStyle() { |
|||
$('.page-title').show(); |
|||
$('#easydex-header-div').removeAttr( 'style' ); |
|||
$( |
|||
'#easydex_acpax_wallet_actions_header,' + |
|||
'#easydex_kmd_wallet_actions_header,' + |
|||
'#easydex_zec_wallet_actions_header,' + |
|||
'#jumblr_actions_header,' + |
|||
'#easydex_btc_btcd_balances_header' |
|||
) |
|||
.hide(); |
|||
sessionStorage.setItem('NativeWalletActions', 'stop'); |
|||
} |
|||
|
|||
function applyJumblrStyle() { |
|||
$('.header-easydex-section').html('<img src="assets/images/native/jumblr_header_title_logo.png"><br>' + _lang[defaultLang].SIDEBAR.JUMBLR_MOTTO); |
|||
$('.page-title').hide(); |
|||
$('#easydex-header-div').css({ |
|||
'background-image': 'url("assets/images/bg/jumblr_transparent_header_bg.png")', |
|||
'background-repeat': 'no-repeat', |
|||
'background-position': '0%' |
|||
}); |
|||
$( |
|||
'#easydex_acpax_wallet_actions_header,' + |
|||
'#easydex_kmd_wallet_actions_header,' + |
|||
'#easydex_zec_wallet_actions_header,' + |
|||
'#easydex_btc_btcd_balances_header' |
|||
) |
|||
.hide(); |
|||
$('#jumblr_actions_header').show(); |
|||
sessionStorage.setItem('NativeWalletActions', 'start'); |
|||
} |
|||
|
|||
function removeJumblrStyle() { |
|||
$('.page-title').show(); |
|||
$('#easydex-header-div').removeAttr( 'style' ); |
|||
$( |
|||
'#easydex_acpax_wallet_actions_header,' + |
|||
'#easydex_kmd_wallet_actions_header,' + |
|||
'#jumblr_actions_header,' + |
|||
'#easydex_btc_btcd_balances_header' |
|||
) |
|||
.hide(); |
|||
sessionStorage.setItem('NativeWalletActions', 'stop'); |
|||
} |
|||
|
|||
function applyACPAXWalletStyle() { |
|||
$('.page-title').hide(); |
|||
$('#easydex-header-div').css({ |
|||
'background-repeat': 'no-repeat', |
|||
'background-position': '0%' |
|||
}); |
|||
$('#easydex_acpax_wallet_actions_header').show(); |
|||
$( |
|||
'#easydex_kmd_wallet_actions_header,' + |
|||
'#easydex_zec_wallet_actions_header,' + |
|||
'#jumblr_actions_header,' + |
|||
'#easydex_btc_btcd_balances_header' |
|||
) |
|||
.hide(); |
|||
sessionStorage.setItem('NativeWalletActions', 'start'); |
|||
getTotalKMDBalance(); |
|||
} |
|||
|
|||
function removeACPAXWalletStyle() { |
|||
$('.page-title').show(); |
|||
$('#easydex-header-div').removeAttr( 'style' ); |
|||
$( |
|||
'#easydex_acpax_wallet_actions_header,' + |
|||
'#easydex_kmd_wallet_actions_header,' + |
|||
'#easydex_zec_wallet_actions_header,' + |
|||
'#jumblr_actions_header,' + |
|||
'#easydex_btc_btcd_balances_header' |
|||
) |
|||
.hide(); |
|||
sessionStorage.setItem('NativeWalletActions', 'stop'); |
|||
} |
|||
|
|||
function applyDashboardStyle() { |
|||
$( |
|||
'.page-aside,' + |
|||
'.page-main' |
|||
) |
|||
.show(); |
|||
/* set default map height */ |
|||
var navbarH = $('.site-navbar').outerHeight(), |
|||
footerH = $('.site-footer').outerHeight(), |
|||
mapH = $(window).height() - navbarH - footerH; |
|||
|
|||
$('.page-main').outerHeight(mapH); |
|||
$('#easydex-header-div').hide(); |
|||
|
|||
var active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'); |
|||
console.log(active_edexcoinmodecode); |
|||
|
|||
if (active_edexcoinmodecode == 'Basilisk') { |
|||
$('#edex-footer').hide(); |
|||
} else { |
|||
$('#edex-footer').show(); |
|||
} |
|||
|
|||
setTimeout(function() { |
|||
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|||
console.log(active_edexcoin); |
|||
|
|||
if (active_edexcoin == 'COIN') { |
|||
var basiliskCoins = $('.page-aside .wallet-widgets-list .list-group .list-group-item .widget-content[data-edexcoinmodecode="Basilisk"] a'); |
|||
|
|||
if (basiliskCoins && basiliskCoins.length) { |
|||
basiliskCoins[0].click(); |
|||
} else { |
|||
var fullCoins = $('.page-aside .wallet-widgets-list .list-group .list-group-item .widget-content[data-edexcoinmodecode="Full"] a'); |
|||
|
|||
if (fullCoins && fullCoins.length) { |
|||
fullCoins[0].click(); |
|||
} |
|||
} |
|||
} |
|||
}, 1000); |
|||
} |
|||
|
|||
function removeDashboardStyle() { |
|||
$( |
|||
'.page-aside,' + |
|||
'.page-main' |
|||
) |
|||
.hide(); |
|||
$('#easydex-header-div').show(); |
|||
$('#edex-footer').hide(); |
|||
} |
@ -1,56 +0,0 @@ |
|||
templates.addCoinLoginModal = |
|||
` |
|||
<!-- Modal --> |
|||
<div class="modal fade modal-3d-sign" id="AddCoinDilogModel-login" aria-hidden="true" aria-labelledby="AddCoinDilogModel-login" role="dialog" tabindex="-1"> |
|||
<div class="modal-dialog modal-center modal-lg"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header bg-orange-a400 wallet-send-header"> |
|||
<button type="button" class="close white" data-dismiss="modal" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<h4 class="modal-title white" data-lang="INDEX.SELECT_A_COIN"></h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="col-sm-8"> |
|||
<div class="form-group"> |
|||
<select class="form-control form-material" id="addcoin_select_coin_mdl_options-login"> |
|||
<option data-lang="INDEX.SELECT"></option> |
|||
${templates.addCoinOptions} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-4" style="text-align: center"> |
|||
<button type="button" class="btn btn-primary mdl_addcoin_done_btn-login" data-toggle="modal" data-dismiss="modal" id="mdl_addcoin_done_btn-login" data-lang="INDEX.ACTIVATE_COIN"></button> |
|||
</div> |
|||
<div class="col-sm-12 text-center"> |
|||
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login"> |
|||
<input type="radio" class="to-labelauty labelauty" name="addcoin_select_mode_mdl-login" data-plugin="labelauty" id="addcoin_mdl_full_mode_login" data-labelauty="Full Mode|Full Mode" value="1" checked> |
|||
</div> |
|||
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login"> |
|||
<input type="radio" class="to-labelauty labelauty" name="addcoin_select_mode_mdl-login" data-plugin="labelauty" id="addcoin_mdl_basilisk_mode_login" value="0" data-labelauty="Basilisk Mode|Basilisk Mode"> |
|||
</div> |
|||
<div class="form-group col-lg-4 col-md-4 col-sm-12 col-xs-12 style-addcoin-lbl-mdl-login"> |
|||
<input type="radio" class="to-labelauty labelauty" name="addcoin_select_mode_mdl-login" data-plugin="labelauty" id="addcoin_mdl_native_mode_login" value="-1" data-labelauty="Native Mode|Native Mode"> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12" style="color: #333"> |
|||
<p> |
|||
<strong><span data-lang="INDEX.FULL_MODE"></span>:</strong> <span data-lang="INDEX.FULL_MODE_DESC"></span> |
|||
</p> |
|||
<p> |
|||
<strong><span data-lang="INDEX.BASILISK_MODE"></span>:</strong> <span data-lang="INDEX.BASILISK_MODE_DESC"></span> |
|||
</p> |
|||
<p> |
|||
<strong><span data-lang="INDEX.NATIVE_MODE"></span>:</strong> <span data-lang="INDEX.NATIVE_MODE_DESC1"></span> <strong>Komodo Daemon</strong> <span data-lang="INDEX.NATIVE_MODE_DESC2"></span> <i>Iguana Daemon</i> <span data-lang="INDEX.NATIVE_MODE_DESC3"></span>. |
|||
</p> |
|||
<div class="alert alert-icon alert-primary" role="alert"> |
|||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> |
|||
<i class="icon md-info-outline" aria-hidden="true"></i> <strong data-lang="INDEX.NATIVE_MODE"></strong> <span data-lang="INDEX.NATIVE_MODE_DESC4"></span> <strong data-lang="INDEX.NATIVE_MODE_DESC5"></strong>, <i data-lang="INDEX.NATIVE_MODE_DESC5"></i>. |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Modal --> |
|||
`;
|
@ -1,57 +0,0 @@ |
|||
templates.addCoinModal = |
|||
` |
|||
<!-- Modal --> |
|||
<div class="modal fade modal-3d-sign" id="AddCoinDilogModel" aria-hidden="true" aria-labelledby="AddCoinDilogModel" role="dialog" tabindex="-1"> |
|||
<div class="modal-dialog modal-center modal-lg"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header bg-orange-a400 wallet-send-header"> |
|||
<button type="button" class="close white" data-dismiss="modal" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<h4 class="modal-title white" data-lang="INDEX.SELECT_A_COIN"></h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="col-sm-8"> |
|||
<div class="form-group"> |
|||
<select class="form-control form-material" id="addcoin_select_coin_mdl_options"> |
|||
<option data-lang="INDEX.SELECT"></option> |
|||
${templates.addCoinOptions} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-4" style="text-align: center"> |
|||
<button type="button" class="btn btn-primary mdl_addcoin_done_btn" data-toggle="modal" data-dismiss="modal" id="mdl_addcoin_done_btn" data-lang="INDEX.ACTIVATE_COIN"></button> |
|||
</div> |
|||
<div class="col-sm-12" style="text-align: center"> |
|||
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl"> |
|||
<input type="radio" class="to-labelauty labelauty" name="addcoin_select_mode_mdl" data-plugin="labelauty" id="addcoin_mdl_full_mode" data-labelauty="Full Mode|Full Mode" value="1" checked> |
|||
</div> |
|||
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl"> |
|||
<input type="radio" class="to-labelauty labelauty" name="addcoin_select_mode_mdl" data-plugin="labelauty" id="addcoin_mdl_basilisk_mode" value="0" data-labelauty="Basilisk Mode|Basilisk Mode"> |
|||
</div> |
|||
<div class="form-group col-lg-4 col-md-4 col-sm-12 col-xs-12 style-addcoin-lbl-mdl"> |
|||
<input type="radio" class="to-labelauty labelauty" name="addcoin_select_mode_mdl" data-plugin="labelauty" id="addcoin_mdl_native_mode" value="-1" data-labelauty="Native Mode|Native Mode"> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12" style="color: #333"> |
|||
<p> |
|||
<strong><span data-lang="INDEX.FULL_MODE"></span>:</strong> <span data-lang="INDEX.FULL_MODE_DESC"></span> |
|||
</p> |
|||
<p> |
|||
<strong><span data-lang="INDEX.BASILISK_MODE"></span>:</strong> <span data-lang="INDEX.BASILISK_MODE_DESC"></span> |
|||
</p> |
|||
<p> |
|||
<strong><span data-lang="INDEX.NATIVE_MODE"></span>:</strong> <span data-lang="INDEX.NATIVE_MODE_DESC1"></span> <strong>Komodo Daemon</strong> <span data-lang="INDEX.NATIVE_MODE_DESC2"></span> <i>Iguana Daemon</i> <span data-lang="INDEX.NATIVE_MODE_DESC3"></span>. |
|||
</p> |
|||
<div class="alert alert-icon alert-primary" role="alert"> |
|||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> |
|||
<i class="icon md-info-outline" aria-hidden="true"></i> <strong data-lang="INDEX.NATIVE_MODE"></strong> <span data-lang="INDEX.NATIVE_MODE_DESC4"></span> <strong data-lang="INDEX.NATIVE_MODE_DESC5"></strong>, <i data-lang="INDEX.NATIVE_MODE_DESC5"></i>. |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Modal --> |
|||
<!--<button type="button" class="btn btn-info btn-lg btn-block waves-effect waves-light" data-target="#AddCoinDilogModel" data-toggle="modal">Activate Coin</button>--> |
|||
`;
|
@ -1,73 +0,0 @@ |
|||
templates.addCoinOptions = |
|||
` |
|||
<optgroup label="Crypto Currencies"> |
|||
<option value="ANC">AnonCoin (ANC)</option> |
|||
<option value="BTC">Bitcoin (BTC)</option> |
|||
<option value="BTCD">BitcoinDark (BTCD)</option> |
|||
<option value="BTM">Bitmark (BTM)</option> |
|||
<option value="CARB">Carboncoin (CARB)</option> |
|||
<option value="DGB">Digibyte (DGB)</option> |
|||
<option value="DOGE">Dogecoin (DOGE)</option> |
|||
<option value="FRK">Franko (FRK)</option> |
|||
<option value="GAME">GameCredits (GAME)</option> |
|||
<option value="KMD">Komodo (KMD)</option> |
|||
<option value="LTC">Litecoin (LTC)</option> |
|||
<option value="MZC">MazaCoin (MZC)</option> |
|||
<option value="SYS">SysCoin (SYS)</option> |
|||
<option value="UNO">Unobtanium (UNO)</option> |
|||
<option value="ZEC">Zcash (ZEC)</option> |
|||
<option value="ZET">Zetacoin (ZET)</option> |
|||
</optgroup> |
|||
<optgroup label="Assetchains"> |
|||
<option value="BET">BET (BET)</option> |
|||
<option value="BOTS">BOTS (BOTS)</option> |
|||
<option value="CEAL">CEAL NET (CEAL)</option> |
|||
<option value="CRYPTO">CRYPTO (CRYPTO)</option> |
|||
<option value="HODL">HODL (HODL)</option> |
|||
<option value="DEX">InstantDEX (DEX)</option> |
|||
<option value="JUMBLR">JUMBLR (JUMBLR)</option> |
|||
<option value="KV">KV (KV)</option> |
|||
<option value="MGW">MultiGateway (MGW)</option> |
|||
<option value="MVP">MVP Lineup (MVP)</option> |
|||
<option value="PANGEA">PANGEA (PANGEA)</option> |
|||
<option value="REVS">REVS (REVS)</option> |
|||
<option value="SHARK">SHARK (SHARK)</option> |
|||
<option value="MESH">SpaceMesh (MESH)</option> |
|||
<option value="SUPERNET">SUPERNET (SUPERNET)</option> |
|||
<option value="WLC">WIRELESS (WLC)</option> |
|||
</optgroup> |
|||
<optgroup label="Fiat Currencies"> |
|||
<option value="AUD">Australian Dollar (AUD)</option> |
|||
<option value="BRL">Brazilian Real (BRL)</option> |
|||
<option value="GBP">British Pound (GBP)</option> |
|||
<option value="BGN">Bulgarian Lev (BGN)</option> |
|||
<option value="CAD">Canadian Dollar (CAD)</option> |
|||
<option value="HRK">Croatian Kuna (HRK)</option> |
|||
<option value="CZK">Czech Koruna (CZK)</option> |
|||
<option value="CNY">Chinese Yuan (CNY)</option> |
|||
<option value="DKK">Danish Krone (DKK)</option> |
|||
<option value="EUR">Euro (EUR)</option> |
|||
<option value="HKD">Hong Kong Dollar (HKD)</option> |
|||
<option value="HUF">Hungarian Forint (HUF)</option> |
|||
<option value="INR">Indian Rupee (INR)</option> |
|||
<option value="IDR">Indonesian Rupiah (IDR)</option> |
|||
<option value="ILS">Israeli Shekel (ILS)</option> |
|||
<option value="JPY">Japanese Yen (JPY)</option> |
|||
<option value="KRW">Korean Won (KRW)</option> |
|||
<option value="MYR">Malaysian Ringgit (MYR)</option> |
|||
<option value="MXN">Mexican peso (MXN)</option> |
|||
<option value="NZD">New Zealand Dollar (NZD)</option> |
|||
<option value="NOK">Norwegian Krone (NOK)</option> |
|||
<option value="PHP">Philippine Peso (PHP)</option> |
|||
<option value="PLN">Polish Zloty (PLN)</option> |
|||
<option value="RON">Romanian Leu (RON)</option> |
|||
<option value="RUB">Russian Ruble (RUB)</option> |
|||
<option value="SGD">Singapore Dollar (SGD)</option> |
|||
<option value="ZAR">South African Rand (ZAR)</option> |
|||
<option value="SEK">Swedish Krona (SEK)</option> |
|||
<option value="CHF">Swiss Franc (CHF)</option> |
|||
<option value="THB">Thai Baht (THB)</option> |
|||
<option value="TRY">Turkish Lira (TRY)</option> |
|||
<option value="USD">US Dollar (USD)</option> |
|||
</optgroup> |
|||
`;
|
@ -1,86 +0,0 @@ |
|||
templates.atomicExplorer = |
|||
` |
|||
<!-- BEGIN ATOMIC EXPLORER SETTINGS CONTENT BODY --> |
|||
<div class="page animsition" data-animsition-in="fade-in" data-animsition-out="fade-out" style="margin-left: 0px"> |
|||
<div class="page-content" id="section-iguana-atomic-explorer"> |
|||
<div class="row" id="atomic-explorer" data-plugin="masonry"> |
|||
<div class="col-xlg-12 col-md-12"> |
|||
<h4 class="font-size-14 text-uppercase">Atomic Explorer</h4> |
|||
<!-- Atomic Explorer Tab --> |
|||
<div class="panel panel-bordered"> |
|||
<!--<div class="panel-heading"> |
|||
<h3 class="panel-title">Panel Heading</h3> |
|||
</div>--> |
|||
<div class="panel-body"> |
|||
<div class="col-sm-4 col-xs-12"> |
|||
<div class="form-group"> |
|||
<select class="form-control form-material" id="atomic_explorer_select_coin_options"> |
|||
<option value="" data-lang="INDEX.SELECT_COIN"></option> |
|||
${templates.addCoinOptions} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-4 col-xs-12" style="text-align: center"> |
|||
<select class="form-control form-material" id="atomic_explorer_select_command_options"> |
|||
<option value="">-Select Command-</option> |
|||
<option value="history">Address History</option> |
|||
<option value="getbalance">Get Balance</option> |
|||
<option value="listunspent">List Unspent</option> |
|||
<option value="txid">Transaction ID</option> |
|||
<option value="blockash">Block Hash</option> |
|||
<option value="chaintip">Chain Tip</option> |
|||
<option value="activehandle">Active Handle</option> |
|||
<option value="gettransaction">Get Transaction</option> |
|||
<option value="dex_alladdresses">DEX All Addresses</option> |
|||
<option value="dex_importaddress">DEX Import Address</option> |
|||
<option value="dex_checkaddress">DEX Check Address</option> |
|||
<option value="dex_validateaddress">DEX Validate Address</option> |
|||
<option value="dex_getinfo">DEX Get Info</option> |
|||
<option value="dex_getnotaries">DEX Get Notaries</option> |
|||
<option value="dex_getbestblockhash">DEX Get Best Block Hash</option> |
|||
<option value="dex_getblockhash">DEX Get Block Hash</option> |
|||
<option value="dex_getblock">DEX Get Block</option> |
|||
<option value="dex_gettxin">DEX Get txin</option> |
|||
<option value="dex_gettxout">DEX Get txout</option> |
|||
<option value="dex_gettransaction">DEX Get Transaction</option> |
|||
<option value="dex_getbalance">DEX Get Balance</option> |
|||
<option value="dex_getsupply">DEX Get Supply</option> |
|||
<option value="dex_listtransactions">DEX List Transactions</option> |
|||
<option value="dex_listtransactions2">DEX List Transactions 2</option> |
|||
<option value="dex_listspent">DEX List Spent</option> |
|||
<option value="dex_listunspent">DEX List Unspent</option> |
|||
<option value="dex_listunspent2">DEX List Unspent 2</option> |
|||
<option value="dex_sendrawtransaction">DEX Send Raw Transaction</option> |
|||
<option value="basilisk_refresh">Basilisk Refresh</option> |
|||
<option value="jumblr_status">Jumbler Status</option> |
|||
</select> |
|||
</div> |
|||
<div class="col-sm-4 col-xs-12" style="text-align: center"> |
|||
<input type="text" class="form-control" id="atomic_explorer_input_data" name="atomic_explorer_input_data" placeholder="addr, txid, blockash etc."> |
|||
</div> |
|||
<div class="col-sm-12 col-xs-12" style="text-align: center"> |
|||
<button type="button" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="atomic_explorer_getcoinpeers_btn">Submit</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Atomic Explorer Tab --> |
|||
</div> |
|||
<div class="col-xlg-4 col-md-12"> |
|||
<!-- Atomic Explorer tab --> |
|||
<div class="panel"> |
|||
<div class="panel-heading"> |
|||
<h3 class="panel-title">Raw Output</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="tab-content"> |
|||
<pre id="atomic-explorer-commands-output"></pre> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Atomic Explorer tab --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END ATOMIC EXPLORER SETTINGS CONTENT BODY --> |
|||
`;
|
@ -1,143 +0,0 @@ |
|||
templates.bottomIncludes = |
|||
` |
|||
<script> |
|||
if (typeof module === 'object') { |
|||
window.module = module; module = undefined; |
|||
} |
|||
</script> |
|||
<script src="assets/global/vendor/jquery/jquery.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/bootstrap/bootstrap.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/animsition/animsition.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/asscroll/jquery-asScroll.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/jquery-scrollbar/jquery.scrollbar.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/mousewheel/jquery.mousewheel.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/asscrollable/jquery.asScrollable.all.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/ashoverscroll/jquery-asHoverScroll.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/waves/waves.min.js" type="text/javascript"></script> |
|||
<!-- Plugins --> |
|||
<script src="assets/global/vendor/switchery/switchery.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/intro-js/intro.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/screenfull/screenfull.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/slidepanel/jquery-slidePanel.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/bootbox/bootbox.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/jquery-validation/jquery.validate.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/jquery-validation/additional-methods.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/bootstrap-toastr/toastr.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/bootstrap-select/bootstrap-select.min.js"> type="text/javascript"</script> |
|||
<script src="assets/global/vendor/sweetalert2/sweetalert2.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/jquery-qrcode/jquery.qrcode.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/clipboard/clipboard.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/asprogress/jquery-asProgress.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/jquery-labelauty/jquery-labelauty.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/alertify-js/alertify.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/nprogress/nprogress.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/ladda-bootstrap/spin.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/ladda-bootstrap/ladda.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/datatables/jquery.dataTables.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/datatables-fixedheader/dataTables.fixedHeader.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/datatables-bootstrap/dataTables.bootstrap.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/datatables-responsive/dataTables.responsive.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/datatables-tabletools/dataTables.tableTools.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/underscore-js/underscore-min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/javascript-md5/md5.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/bluebird/bluebird.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/vendor/socket.io.js" type="text/javascript"></script> |
|||
<!-- Crypto Dependencies --> |
|||
<script src="assets/scripts/wordlist.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/passphrasegenerator.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/seedrandom.js" type="text/javascript"></script> |
|||
<!-- Scripts --> |
|||
<script src="assets/global/js/core.js" type="text/javascript"></script> |
|||
<script src="assets/js/site.js" type="text/javascript"></script> |
|||
<script src="assets/js/sections/menu.js" type="text/javascript"></script> |
|||
<script src="assets/js/sections/menubar.js" type="text/javascript"></script> |
|||
<script src="assets/js/sections/sidebar.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/configs/config-colors.js" type="text/javascript"></script> |
|||
<script src="assets/js/configs/config-tour.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/asscrollable.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/nprogress.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/animsition.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/slidepanel.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/bootbox.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/switchery.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/tabs.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/buttons.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/ladda-bootstrap.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/asprogress.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/jquery-labelauty.min.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/alertify-js.js" type="text/javascript"></script> |
|||
<script src="assets/global/js/components/panel.min.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/config.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/checkie.js" type="text/javascript"></script> |
|||
|
|||
<!-- Iguana API Scripts --> |
|||
<script src="assets/scripts/iguana_api.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/iguana_api/IguanaHandle.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/iguana_api/IguanaAddcoin.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/iguana_api/IguanaEDEX.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/iguana_api/IguanaDEX.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/iguana_api/IguanaShepherd.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/iguana_api/IguanaJumblr.js" type="text/javascript"></script> |
|||
<!-- End Iguana API Scripts --> |
|||
|
|||
<script src="assets/scripts/login.js" type="text/javascript"></script> |
|||
<!-- Dashboard Scripts --> |
|||
<script src="assets/scripts/dashboard.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/dashboard/DashboardEDEX.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/dashboard/DashboardDEX.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/dashboard/DashboardBasilisk.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/dashboard/DashboardCoinFiat.js" type="text/javascript"></script> |
|||
<!-- End Dashboard Scripts --> |
|||
|
|||
<!--<script src="assets/scripts/coinwallets.js" type="text/javascript"></script>--> |
|||
<script src="assets/scripts/jumblr.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/sidebar.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/walletsettings.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/atomicexplorer.js" type="text/javascript"></script> |
|||
|
|||
<!-- Native KMD Wallet Scripts --> |
|||
<script src="assets/scripts/kmd_wallet/KMDWalletDashboard.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/kmd_wallet/KMDInit.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/kmd_wallet/KMDBalance.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/kmd_wallet/KMDGetinfo.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/kmd_wallet/KMDTransaction.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/kmd_wallet/KMDTransactionInfo.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/kmd_wallet/KMDAddress.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/kmd_wallet/KMDSendTx.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/kmd_wallet_dashboard.js" type="text/javascript"></script> |
|||
<!-- End Native KMD Wallet Scripts --> |
|||
|
|||
<!-- Multilang Scripts --> |
|||
<script src="assets/scripts/lang.js" type="text/javascript"></script> |
|||
<script src="assets/scripts/lang/en.js" type="text/javascript"></script> |
|||
<!-- End Multilang Scripts --> |
|||
|
|||
<script type="text/javascript"> |
|||
(function(document, window, $) { |
|||
'use strict'; |
|||
var Site = window.Site; |
|||
$(document).ready(function() { |
|||
Site.run(); |
|||
|
|||
var socket = io.connect('http://localhost:17777'); |
|||
socket.on('connect', function(data) { |
|||
socket.emit('join', 'EDEX GUI joined'); |
|||
}); |
|||
socket.on('messages', function(data) { |
|||
console.log(data); |
|||
}); |
|||
socket.on('service', function(data) { |
|||
console.log('service', data); |
|||
if (data.komodod && data.komodod.error === 'start error') { |
|||
toastr.error(_lang[defaultLang].TOASTR.KOMODO_ERR, _lang[defaultLang].TOASTR.SERVICE_NOTIFICATION + '.'); |
|||
} |
|||
}); |
|||
lang(); |
|||
}); |
|||
})(document, window, jQuery); |
|||
|
|||
jQuery(document).ready(function() { |
|||
jQuery('.scrollbar-dynamic').scrollbar(); |
|||
}); |
|||
</script> |
|||
`;
|
@ -1,88 +0,0 @@ |
|||
templates.dashboardInfo = |
|||
` |
|||
<div data-edexcoin="COIN" id="edexcoin_dashboardinfo" style="display: none"> |
|||
<div class="col-xs-12 margin-top-20"> |
|||
<!-- Iguana Wallet Settings Box Tab --> |
|||
<div class="panel nav-tabs-horizontal"> |
|||
<!-- KMD Wallet Dashboard --> |
|||
<div data-edexcoin="COIN" id="edexcoin_dashoard_section"> |
|||
<div class="col-xlg-12 col-lg-12 col-sm-12 col-xs-12 edexcoin_dashoard_section_main_div"> |
|||
<!-- Panel FixedHeader --> |
|||
<div id="edexcoin_txhistory" class="panel"> |
|||
<header class="panel-heading" style="z-index: 10"> |
|||
<div class="panel-actions"> |
|||
<a href="javascript:void(0)" class="dropdown-toggle white btn-xs btn-info btn_refresh_edexcoin_dashboard" data-edexcoin="COIN" aria-expanded="false" role="button"> |
|||
<i class="icon fa-refresh margin-right-10" aria-hidden="true"></i> <span data-lang="INDEX.REFRESH"></span> |
|||
</a> |
|||
<div class="dropdown"> |
|||
<a class="dropdown-toggle btn-xs btn-default" data-edexcoin="COIN" id="btn_edexcoin_basilisk" data-toggle="dropdown" href="javascript:void(0)" |
|||
aria-expanded="false" role="button" style="display: none"> |
|||
<i class="icon fa-magic margin-right-10" aria-hidden="true"></i> <span data-lang="INDEX.BASILISK_ACTIONS"></span> <span class="caret"></span> |
|||
</a> |
|||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="btn_edexcoin_basilisk" |
|||
role="menu"> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" class="btn_edexcoin_dashboard_getnotaries" data-edexcoin="COIN" id="btn_edexcoin_dashboard_getnotaries" role="menuitem"> |
|||
<i class="icon fa-sitemap" aria-hidden="true"></i> <span data-lang="INDEX.GET_NOTARY_NODES_LIST"></span> |
|||
</a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" class="btn_edexcoin_dashboard_refresh_basilisk_conn" data-edexcoin="COIN" id="btn_edexcoin_dashboard_refresh_basilisk_conn" role="menuitem"> |
|||
<i class="icon wb-refresh" aria-hidden="true"></i> <span data-lang="INDEX.REFRESH_BASILISK_CONNECTIONS"></span> |
|||
</a> |
|||
</li> |
|||
<li data-edexcoin="COIN" role="presentation"> |
|||
<a href="javascript:void(0)" class="btn_edexcoin_dashboard_fetchdata" data-edexcoin="COIN" id="btn_edexcoin_dashboard_fetchdata" role="menuitem"> |
|||
<i class="icon fa-cloud-download" aria-hidden="true"></i> <span data-lang="INDEX.FETCH_WALLET_DATA"></span> |
|||
</a> |
|||
</li> |
|||
<li data-edexcoin="COIN" role="presentation"> |
|||
<a href="javascript:void(0)" class="btn_edexcoin_dashboard_refetchdata" data-edexcoin="COIN" id="btn_edexcoin_dashboard_refetchdata" role="menuitem"> |
|||
<i class="icon fa-cloud-download" aria-hidden="true"></i> <span data-lang="INDEX.REFETCH_WALLET_DATA"></span> |
|||
</a> |
|||
</li> |
|||
<!--<li data-edexcoin="COIN" role="presentation"><a href="javascript:void(0)" class="btn_edexcoin_dashboard_register" data-edexcoin="COIN" id="btn_edexcoin_dashboard_register" role="menuitem"><i class="icon fa-sign-in" aria-hidden="true"></i> Register All Wallet Address</a></li>--> |
|||
<!--<li data-edexcoin="COIN" role="presentation"><a href="javascript:void(0)" class="btn_edexcoin_dashboard_validate" data-edexcoin="COIN" id="btn_edexcoin_dashboard_validate" role="menuitem"><i class="icon fa-check" aria-hidden="true"></i> Validate Address on Network</a></li>--> |
|||
</ul> |
|||
</div> |
|||
<!--<a class="panel-action icon md-refresh-alt" data-toggle="panel-refresh" data-load-type="blue-only" data-load-callback="customRefreshCallback" aria-hidden="true"></a> |
|||
<a class="panel-action icon md-minus" aria-expanded="true" data-toggle="panel-collapse" aria-hidden="true"></a> |
|||
<a class="panel-action icon md-fullscreen" data-toggle="panel-fullscreen" aria-hidden="true"></a>--> |
|||
</div> |
|||
<h4 class="panel-title" data-lang="INDEX.TRANSACTION_HISTORY"></h4> |
|||
</header> |
|||
<div class="panel-body"> |
|||
<!--<p>Transaction History info goes here...</p>--> |
|||
<table class="table table-hover dataTable table-striped" data-edexcoin="COIN" id="edex-tx-history-tbl" width="100%"> |
|||
<thead> |
|||
<tr> |
|||
<th data-lang="INDEX.DIRECTION"></th> |
|||
<th class="hidden-xs hidden-sm" data-lang="INDEX.CONFIRMATIONS"></th> |
|||
<th data-lang="INDEX.AMOUNT"></th> |
|||
<th data-lang="INDEX.TIME"></th> |
|||
<th data-lang="INDEX.DEST_ADDRESS"></th> |
|||
<th class="hidden-xs hidden-sm" data-lang="INDEX.TX_DETAIL"></th> |
|||
</tr> |
|||
</thead> |
|||
<tfoot> |
|||
<tr> |
|||
<th data-lang="INDEX.DIRECTION"></th> |
|||
<th data-lang="INDEX.CONFIRMATIONS"></th> |
|||
<th data-lang="INDEX.AMOUNT"></th> |
|||
<th data-lang="INDEX.TIME"></th> |
|||
<th data-lang="INDEX.DEST_ADDRESS"></th> |
|||
<th data-lang="INDEX.TX_DETAIL"></th> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!-- End Panel FixedHeader --> |
|||
</div> |
|||
</div> |
|||
<!-- End KMD Wallet Dashboard --> |
|||
</div> |
|||
<!-- End Iguana Wallet Settings Box Tab --> |
|||
</div> |
|||
</div> |
|||
`;
|
@ -1,116 +0,0 @@ |
|||
templates.headerMenu = |
|||
` |
|||
<!-- Header with background and menus --> |
|||
<div class="page-header page-header-bordered header-easydex margin-bottom-0" id="easydex-header-div"> |
|||
<h1 class="page-title">EasyDEX</h1> |
|||
<ol class="breadcrumb"> |
|||
<li class="header-easydex-section" data-lang="INDEX.DASHBOARD"></li> |
|||
<!--<li class="active">You are Here</li>--> |
|||
</ol> |
|||
<div class="page-header-actions" style="z-index: 1"> |
|||
<!-- KMD Wallet Header button --> |
|||
<div id="kmd_header_button"> |
|||
<button type="button" id="easydex_kmd_wallet_actions_header" class="bg-teal-500 btn btn-floating white waves-effect waves-float waves-light" data-toggle="dropdown" aria-expanded="false" style="display: none"> |
|||
<i class="icon md-plus" aria-hidden="true"></i> |
|||
</button> |
|||
<ul class="dropdown-menu animate dropdown-menu-right" aria-labelledby="easydex_kmd_wallet_actions_header" role="menu"> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_dashboard" data-lang="INDEX.DASHBOARD"></a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_send" data-lang="INDEX.SEND"></a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_recieve" data-lang="INDEX.RECEIVE"></a> |
|||
</li> |
|||
<!--<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_transactions" data-lang="INDEX.TRANSACTIONS"></a> |
|||
</li>--> |
|||
<li class="divider" role="presentation"></li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_settings" data-lang="INDEX.SETTINGS"></a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
<!-- End KMD Wallet Header button --> |
|||
<!-- ZEC Wallet Header button --> |
|||
<div id="zec_header_button"> |
|||
<button type="button" id="easydex_zec_wallet_actions_header" class="bg-yellow-600 btn btn-floating white waves-effect waves-float waves-light" data-toggle="dropdown" aria-expanded="false" style="display: none"> |
|||
<i class="icon md-plus" aria-hidden="true"></i> |
|||
</button> |
|||
<ul class="dropdown-menu animate dropdown-menu-right" aria-labelledby="easydex_zec_wallet_actions_header" role="menu"> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_dashboard" data-lang="INDEX.DASHBOARD"></a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_send" data-lang="INDEX.SEND"></a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_recieve" data-lang="INDEX.RECEIVE"></a> |
|||
</li> |
|||
<!--<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_transactions" data-lang="INDEX.TRANSACTIONS"></a> |
|||
</li>--> |
|||
<li class="divider" role="presentation"></li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_settings" data-lang="INDEX.SETTINGS"></a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
<!-- End ZEC Wallet Header button --> |
|||
<!-- Jumblr Header button --> |
|||
<div id="kmd_header_button"> |
|||
<button type="button" id="jumblr_actions_header" class="btn white waves-effect waves-light" style="display: none"> |
|||
<i class="icon fa-refresh" aria-hidden="true"></i><span data-lang="INDEX.REFRESH"></span> |
|||
</button> |
|||
</div> |
|||
<!-- End Jumblr Header button --> |
|||
<!-- ASSETCHAINS/PAX Header button --> |
|||
<div id="kmd_header_button"> |
|||
<button type="button" id="easydex_acpax_wallet_actions_header" class="bg-teal-500 btn btn-floating white waves-effect waves-float waves-light" data-toggle="dropdown" aria-expanded="false" style="display: none"> |
|||
<i class="icon md-plus" aria-hidden="true"></i> |
|||
</button> |
|||
<ul class="dropdown-menu animate dropdown-menu-right" aria-labelledby="easydex_acpax_wallet_actions_header" role="menu"> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_dashboard" data-lang="INDEX.DASHBOARD"></a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_send" data-lang="INDEX.SEND"></a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_recieve" data-lang="INDEX.RECEIVE"></a> |
|||
</li> |
|||
<!--<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_transactions" data-lang="INDEX.TRANSACTIONS"></a> |
|||
</li>--> |
|||
<li class="divider" role="presentation"></li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_settings" data-lang="INDEX.SETTINGS"></a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
<!-- End ASSETCHAINS/PAX Header button --> |
|||
<div class="row no-space width-350 hidden-xs" id="easydex_btc_btcd_balances_header" style="display: none"> |
|||
<div class="col-xs-6"> |
|||
<div class="counter"> |
|||
<span class="font-weight-medium" data-currency="BTC" id="header_coinname_balance"> - BTC</span> |
|||
<span class="counter-label small" data-currency="BTC" id="header_coinfiatbalance"> - USD</span> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-6"> |
|||
<div class="counter"> |
|||
<span class="font-weight-medium" data-currency="BTCD" id="header_coinname_balance"> - BTCD</span> |
|||
<span class="counter-label small" data-currency="BTCD" id="header_coinfiatbalance"> - USD</span> |
|||
</div> |
|||
</div> |
|||
<!--<div class="col-xs-4"> |
|||
<div class="counter"> |
|||
<span class="font-weight-medium" data-currency="USD" id="header_fiatname">USD</span> |
|||
<div class="counter-label small" data-currency="USD" id="header_fiattotalbalance">0</div> |
|||
</div> |
|||
</div>--> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Header with background and menus --> |
|||
`;
|
@ -1,6 +0,0 @@ |
|||
templates.ieFix = |
|||
` |
|||
<!--[if lt IE 8]> |
|||
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> |
|||
<![endif]--> |
|||
`;
|
@ -1,225 +0,0 @@ |
|||
templates.jumblr = |
|||
` |
|||
<!-- BEGIN JUMBLR CONTENT BODY --> |
|||
<div class="page animsition" data-animsition-in="fade-in" data-animsition-out="fade-out" style="margin-left: 0px"> |
|||
<div class="page-content" id="section-jumblr"> |
|||
<div class="row" id="jumblr_dashboard" data-plugin="masonry"> |
|||
<div class="col-xs-12" id="jumblr_testing_alert"> |
|||
<div class="alert alert-danger" role="alert"> |
|||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<span style="font-size:24px; text-align: center"> |
|||
<i class="icon fa-paw" aria-hidden="true"></i> <span data-lang="JUMBLR.NOTICE"></span> |
|||
</span> |
|||
<br> |
|||
<span data-lang="JUMBLR.DESCRIPTION"></span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-xs-12" id="jumblr_no_native_kmd_alert"> |
|||
<div class="alert alert-info alert-dismissible" role="alert"> |
|||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<span style="font-size: 24px; text-align: center"> |
|||
<i class="icon fa-paw" aria-hidden="true"></i> <span data-lang="JUMBLR.NEED_NATIVE"></span> |
|||
</span> |
|||
<br> |
|||
<span data-lang="JUMBLR.TO_USE_JUMBLR"></span> |
|||
<br> |
|||
<span data-lang="JUMBLR.IF_YOU_ALREADY_RUNNING"></span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-xlg-12 col-md-12"> |
|||
<p data-lang="JUMBLR.THIS_SCREEN_DOESNT_REFRESH"></p> |
|||
</div> |
|||
|
|||
<div class="col-xs-12"> |
|||
<div class="panel-group" id="jumber_quick_info" aria-multiselectable="true" role="tablist"> |
|||
<div class="panel"> |
|||
<div class="panel-heading" id="jumblr_security_notes" role="tab"> |
|||
<a class="panel-title" data-toggle="collapse" href="#jumblr_security_notes_1" data-parent="#jumber_quick_info" aria-expanded="true" aria-controls="jumblr_security_notes_1" data-lang="JUMBLR.FEW_SECURITY_NOTES"></a> |
|||
</div> |
|||
<div class="panel-collapse collapse in" id="jumblr_security_notes_1" aria-labelledby="jumblr_security_notes" role="tabpanel"> |
|||
<div class="panel-body"> |
|||
<ul> |
|||
<li data-lang="JUMBLR.FEW_SECURITY_NOTES_DESC1"></li> |
|||
<li data-lang="JUMBLR.FEW_SECURITY_NOTES_DESC2"></li> |
|||
<li data-lang="JUMBLR.FEW_SECURITY_NOTES_DESC3"></li> |
|||
<li data-lang="JUMBLR.FEW_SECURITY_NOTES_DESC4"></li> |
|||
<li data-lang="JUMBLR.FEW_SECURITY_NOTES_DESC5"></li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel"> |
|||
<div class="panel-heading" id="jumblr_access_funds" role="tab"> |
|||
<a class="panel-title collapsed" data-toggle="collapse" href="#jumblr_access_funds_2" data-parent="#jumber_quick_info" aria-expanded="false" aria-controls="jumblr_access_funds_2" data-lang="JUMBLR.ACCESS_JUMBLR_FUNDS"></a> |
|||
</div> |
|||
<div class="panel-collapse collapse" id="jumblr_access_funds_2" aria-labelledby="jumblr_access_funds" role="tabpanel"> |
|||
<div class="panel-body"> |
|||
<p data-lang="JUMBLR.ADDRESS_ACCESSIBLE_EASILY"></p> |
|||
<ul> |
|||
<code>duck dog cat donkey</code> |
|||
</ul> |
|||
<ol> |
|||
<li data-lang="JUMBLR.TO_ACCESS"></li> |
|||
<li data-lang="JUMBLR.CLOSE_IAPP"></li> |
|||
<li data-lang="JUMBLR.START_IAPP"></li> |
|||
<li data-lang="JUMBLR.START_KMD"></li> |
|||
<li><span data-lang="JUMBLR.WORD_JUMBLR"></span> |
|||
<ul> |
|||
<li data-lang="JUMBLR.SMALL_LETTERS"></li> |
|||
<li data-lang="JUMBLR.WHITE_SPACE"></li> |
|||
</ul> |
|||
</li> |
|||
<li> |
|||
<span data-lang="JUMBLR.PER_EXAMPLE"></span> |
|||
<br> |
|||
<code>jumblr duck dog cat donkey</code> |
|||
</li> |
|||
<li data-lang="JUMBLR.LOGIN_WITH_JUMBLR"></li> |
|||
</ol> |
|||
<h4 data-lang="JUMBLR.AGAIN_DONT_SHARE"></h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel"> |
|||
<div class="panel-heading" id="jumblr_using_jumblr" role="tab"> |
|||
<a class="panel-title collapsed" data-toggle="collapse" href="#jumblr_using_jumblr_3" data-parent="#jumber_quick_info" aria-expanded="false" aria-controls="jumblr_using_jumblr_3" data-lang="JUMBLR.USING_JUMBLR"></a> |
|||
</div> |
|||
<div class="panel-collapse collapse" id="jumblr_using_jumblr_3" aria-labelledby="jumblr_using_jumblr" |
|||
role="tabpanel"> |
|||
<div class="panel-body"> |
|||
<ul> |
|||
<li data-lang="JUMBLR.RUN_KMD"></li> |
|||
<li data-lang="JUMBLR.LOGIN_KMD"></li> |
|||
<li data-lang="JUMBLR.GO_TO"></li> |
|||
<li data-lang="JUMBLR.FIND_DEPOSIT_ADDR"></li> |
|||
<li data-lang="JUMBLR.YOU_SEND_FUNDS"></li> |
|||
<li data-lang="JUMBLR.KEEP_WALLET_OPEN"></li> |
|||
<li data-lang="JUMBLR.IMPORTANT_FUNDS"></li> |
|||
<li data-lang="JUMBLR.LARGE_LOT"></li> |
|||
</ul> |
|||
<p data-lang="JUMBLR.EG"></p> |
|||
<p data-lang="JUMBLR.93_KMD"></p> |
|||
<p data-lang="JUMBLR.TO_CLEAR_THEM"></p> |
|||
<p data-lang="JUMBLR.WHEN_IT_TOTALS"></p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- Jumblr Tab --> |
|||
<div class="col-xlg-12 col-md-12"> |
|||
<h4 class="font-size-14 text-uppercase" data-lang="JUMBLR.JADDR">Jumblr Addresses</h4> |
|||
<div class="panel" id="projects"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-striped"> |
|||
<tbody> |
|||
<tr> |
|||
<td width="20%" data-lang="JUMBLR.BTC_DEPOSIT"></td> |
|||
<td> |
|||
<span id="jumblr_BTCdeposit"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>BTC Jumblr</td> |
|||
<td> |
|||
<button type="button" class="btn btn-animate btn-animate-side btn-default btn-sm waves-effect waves-light jumblr_show_hide_addr_btc_btn" data-jumblr="BTCjumblr"> |
|||
<span><i class="icon fa-eye" aria-hidden="true"></i> <span data-lang="JUMBLR.SHOW_HIDE"></span></span> |
|||
</button> |
|||
<span class="label label-lg label-outline label-success" id="jumblr_BTCjumblr" style="display: none"></span> |
|||
<span class="label label-lg label-outline label-default" id="jumblr_BTCjumblr_showhide" data-lang="JUMBLR.HIDDEN"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="JUMBLR.KMD_DEPOSIT"></td> |
|||
<td> |
|||
<span id="jumblr_KMDdeposit"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>KMD Jumblr</td> |
|||
<td> |
|||
<button type="button" class="btn btn-animate btn-animate-side btn-default btn-sm waves-effect waves-light jumblr_show_hide_addr_kmd_btn" data-jumblr="KMDjumblr"> |
|||
<span><i class="icon fa-eye" aria-hidden="true"></i> <span data-lang="JUMBLR.SHOW_HIDE"></span></span> |
|||
</button> |
|||
<span class="label label-lg label-outline label-success" id="jumblr_KMDjumblr" style="display: none"></span> |
|||
<span class="label label-lg label-outline label-default" id="jumblr_KMDjumblr_showhide" data-lang="JUMBLR.HIDDEN"></span> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Jumblr tab --> |
|||
|
|||
<!-- Jumblr Tab --> |
|||
<div class="col-xlg-12 col-md-12"> |
|||
<h4 class="font-size-14 text-uppercase" data-lang="JUMBLR.JSTATUS"></h4> |
|||
<div class="panel" id="projects"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-striped"> |
|||
<tbody> |
|||
<!--<tr><td>BTC Deposit</td><td><span id="jumblr_status_BTCdeposit"></span></td></tr> |
|||
<tr><td>BTC Jumblr</td><td><span id="jumblr_status_BTCjumblr"></span></td></tr> |
|||
<tr><td>KMD Deposit</td><td><span id="jumblr_status_KMDdeposit"></span></td></tr> |
|||
<tr><td>KMD Jumblr</td><td><span id="jumblr_status_KMDjumblr"></span></td></tr>--> |
|||
<tr> |
|||
<td width="20%" data-lang="JUMBLR.RESULT"></td> |
|||
<td> |
|||
<span id="jumblr_status_result" class="label label-success"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="JUMBLR.DEPOSITED"></td> |
|||
<td> |
|||
<span id="jumblr_status_deposited"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="JUMBLR.PUB_TO_PRIV"></td> |
|||
<td> |
|||
<span id="jumblr_status_t_to_z"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="JUMBLR.PRIV_TO_PRIV"></td> |
|||
<td> |
|||
<span id="jumblr_status_z_to_z"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="JUMBLR.PRIV_TO_PUB"></td> |
|||
<td> |
|||
<span id="jumblr_status_z_to_t"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="JUMBLR.FINISHED"></td> |
|||
<td> |
|||
<span id="jumblr_status_finished"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="JUMBLR.PENDING"></td> |
|||
<td> |
|||
<span id="jumblr_status_pending"></span> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Jumblr tab --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END JUMBLR CONTENT BODY --> |
|||
`;
|
@ -1,596 +0,0 @@ |
|||
templates.kmdWallet = |
|||
` |
|||
<!-- BEGIN KOMODO WALLET CONTENT BODY --> |
|||
<div class="page animsition" data-animsition-in="fade-in" data-animsition-out="fade-out" style="margin-left: 0px"> |
|||
<div class="page-content" data-extcoin="COIN" id="section-extcoin"> |
|||
<div role="alert" class="alert alert-danger alert-dismissible" data-extcoin="COIN" id="extcoin-wallet-connection-alert" style="display: none"> |
|||
<button aria-label="Close" data-dismiss="alert" class="close" type="button"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<h4 data-lang="INDEX.OOPS_ERROR"></h4> |
|||
<p data-extcoin="COIN" id="extcoin-wallet-connection-alert-text"> |
|||
<span data-lang="INDEX.OOPS_ERROR_DESC"></span> |
|||
<code>server=1</code><br/> |
|||
<code>rpcport=</code><br/> |
|||
<code>rpcuser=</code><br/> |
|||
<code>rpcpassword=</code> |
|||
</p> |
|||
<!--<p class="margin-top-15"><button class="btn btn-success btn-inverse" type="button" id="extcoin-wallet-connection-alert-btn">Refresh Again</button></p>--> |
|||
</div> |
|||
|
|||
<div role="alert" class="alert alert-info alert-dismissible" data-extcoin="COIN" id="extcoin-wallet-activating-alert" style="display: none"> |
|||
<button aria-label="Close" data-dismiss="alert" class="close" type="button"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<h4> |
|||
<span data-lang="INDEX.ACTIVATING_CHAIN"></span><span id="activating-komodod-tridot">...</span><span id="activating-komodod-progress"></span> |
|||
</h4> |
|||
<p data-extcoin="COIN" id="extcoin-wallet-connection-alert-text" data-lang="INDEX.KMD_STARTED"></p> |
|||
</div> |
|||
|
|||
<div class="row" data-extcoin="COIN" style="margin: -20px 0px 10px 0px"> |
|||
<div class="col-xs-12" data-extcoin="COIN" id="extcoin-progressbars"> |
|||
<div class="progress"> |
|||
<div class="progress-bar progress-bar-info progress-bar-striped active" style="width: 0%; font-size: 80%" role="progressbar" data-extcoin="COIN" id="extcoin-sync"> |
|||
<span data-extcoin="COIN" id="extcoin-sync-percent">-</span> | <span data-extcoin="COIN" id="extcoin-synced-blocks">-</span> / <span data-extcoin="COIN" id="extcoin-longestchain">-</span> | <span data-lang="INDEX.CONNECTIONS"></span>: <span data-extcoin="COIN" id="extcoin-connections">-</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row" data-extcoin="COIN" id="extcoin-wallet" data-plugin="masonry" style="display: none"> |
|||
<div class="col-xs-12"> |
|||
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_t"> |
|||
<!-- KMD Transparent Balance Widget--> |
|||
<div class="widget widget-shadow" id="widgetLineareaOne"> |
|||
<div class="widget-content white bg-yellow-800"> |
|||
<div class="padding-20 padding-top-10"> |
|||
<div class="clearfix"> |
|||
<div class="pull-left padding-vertical-10"> |
|||
<i class="icon fa-eye font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.TRANSPARENT_BALANCE"></span> |
|||
</div> |
|||
<span class="pull-right padding-top-10" data-extcoin="COIN" id="kmd_transparent_balance" style="font-size: 22px">-</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End KMD Transparent Balance Widget --> |
|||
</div> |
|||
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_z"> |
|||
<!-- KMD Private (Z) Balance Widget--> |
|||
<div class="widget widget-shadow" id="widgetLineareaOne"> |
|||
<div class="widget-content white bg-blue-grey-800"> |
|||
<div class="padding-20 padding-top-10"> |
|||
<div class="clearfix"> |
|||
<div class="pull-left padding-vertical-10"> |
|||
<i class="icon fa-eye-slash font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.Z_BALANCE"></span> |
|||
</div> |
|||
<span class="pull-right padding-top-10" data-extcoin="COIN" id="kmd_private_balance" style="font-size: 22px">-</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End KMD Private (Z) Balance Widget --> |
|||
</div> |
|||
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_i"> |
|||
<!-- KMD Total Interest Balance Widget--> |
|||
<div class="widget widget-shadow" id="widgetLineareaOne"> |
|||
<div class="widget-content white bg-cyan-700"> |
|||
<div class="padding-20 padding-top-10"> |
|||
<div class="clearfix"> |
|||
<div class="pull-left padding-vertical-10"> |
|||
<i class="icon fa-money font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.INTEREST_EARNED"></span> |
|||
</div> |
|||
<span class="pull-right padding-top-10" data-extcoin="COIN" id="kmd_total_interest_balance" style="font-size: 22px">-</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End KMD Total Interest Balance Widget --> |
|||
</div> |
|||
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_tzi"> |
|||
<!-- KMD Total (Z+T) Balance Widget--> |
|||
<div class="widget widget-shadow" id="widgetLineareaOne"> |
|||
<div class="widget-content white bg-green-600"> |
|||
<div class="padding-20 padding-top-10"> |
|||
<div class="clearfix"> |
|||
<div class="pull-left padding-vertical-10"> |
|||
<i class="icon fa-bullseye font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.ZT_BALANCE"></span> |
|||
</div> |
|||
<span class="pull-right padding-top-10" data-extcoin="COIN" id="kmd_total_tz_balance" style="font-size: 22px">-</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End KMD Total (Z+T) Balance Widget --> |
|||
</div> |
|||
</div> |
|||
|
|||
<div data-extcoin="COIN" id="kmd_wallet_dashboardinfo"> |
|||
<div class="col-xs-12 margin-top-20"> |
|||
<!-- Iguana Wallet Settings Box Tab --> |
|||
<div class="panel nav-tabs-horizontal"> |
|||
<!-- KMD Wallet Dashboard --> |
|||
<div data-extcoin="COIN" id="kmd_wallet_dashoard_section"> |
|||
<div class="col-xlg-12 col-lg-12 col-sm-12 col-xs-12"> |
|||
<!-- Panel FixedHeader --> |
|||
<div class="panel"> |
|||
<header class="panel-heading"> |
|||
<h3 class="panel-title" data-lang="INDEX.TRANSACTION_HISTORY"></h3> |
|||
</header> |
|||
<div class="panel-body"> |
|||
<!--<p>Transaction History info goes here...</p>--> |
|||
<table class="table table-hover dataTable table-striped" data-extcoin="COIN" id="kmd-tx-history-tbl" width="100%"> |
|||
<thead> |
|||
<tr> |
|||
<th data-lang="INDEX.TYPE"></th> |
|||
<th data-lang="INDEX.DIRECTION"></th> |
|||
<th data-lang="INDEX.CONFIRMATIONS"></th> |
|||
<th data-lang="INDEX.AMOUNT"></th> |
|||
<th data-lang="INDEX.TIME"></th> |
|||
<th data-lang="INDEX.DEST_ADDRESS"></th> |
|||
<th data-lang="INDEX.TX_DETAIL"></th> |
|||
</tr> |
|||
</thead> |
|||
<tfoot> |
|||
<tr> |
|||
<th data-lang="INDEX.TYPE"></th> |
|||
<th data-lang="INDEX.DIRECTION"></th> |
|||
<th data-lang="INDEX.CONFIRMATIONS"></th> |
|||
<th data-lang="INDEX.AMOUNT"></th> |
|||
<th data-lang="INDEX.TIME"></th> |
|||
<th data-lang="INDEX.DEST_ADDRESS"></th> |
|||
<th data-lang="INDEX.TX_DETAIL"></th> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!-- End Panel FixedHeader --> |
|||
</div> |
|||
</div> |
|||
<!-- End KMD Wallet Dashboard --> |
|||
</div> |
|||
<!-- End Iguana Wallet Settings Box Tab --> |
|||
</div> |
|||
</div> |
|||
|
|||
<div data-extcoin="COIN" id="kmd_wallet_recieve"> |
|||
<div class="col-xs-12 margin-top-20"> |
|||
<!-- Komodo Wallet receive tab --> |
|||
<div class="panel nav-tabs-horizontal"> |
|||
<!-- KMD Wallet Receive --> |
|||
<div data-extcoin="COIN" id="kmd_wallet_recieve_section"> |
|||
<div class="col-xlg-12 col-lg-12 col-sm-12 col-xs-12"> |
|||
<!-- Panel FixedHeader --> |
|||
<div class="panel"> |
|||
<header class="panel-heading"> |
|||
<div class="panel-actions"> |
|||
<div class="dropdown"> |
|||
<a class="dropdown-toggle white btn btn-warning" data-extcoin="COIN" id="GetNewRecievingAddress" data-toggle="dropdown" href="javascript:void(0)" |
|||
aria-expanded="false" role="button"> |
|||
<i class="icon md-arrows margin-right-10" aria-hidden="true"></i> <span data-lang="INDEX.GET_NEW_ADDRESS"></span> <span class="caret"></span> |
|||
</a> |
|||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="GetNewRecievingAddress" |
|||
role="menu"> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" data-extcoin="COIN" id="kmd_get_new_taddr" role="menuitem"> |
|||
<i class="icon fa-eye" aria-hidden="true"></i> <span data-lang="INDEX.TRANSPARENT_ADDRESS"></span> |
|||
</a> |
|||
</li> |
|||
<li data-extcoin="COIN" role="presentation"> |
|||
<a href="javascript:void(0)" data-extcoin="COIN" id="kmd_get_new_zaddr" role="menuitem"> |
|||
<i class="icon fa-eye-slash" aria-hidden="true"></i> <span data-lang="INDEX.PRIVATE_Z_ADDRESS"></span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
<h3 class="panel-title" data-lang="INDEX.RECEIVING_ADDRESS"></h3> |
|||
</header> |
|||
<div class="panel-body"> |
|||
<!--<p>Receiving addresses info goes here...</p>--> |
|||
<table class="table table-hover dataTable table-striped" data-extcoin="COIN" id="kmd-recieve-addr-tbl"> |
|||
<thead> |
|||
<tr> |
|||
<th data-lang="INDEX.TYPE"></th> |
|||
<th data-lang="INDEX.ADDRESS"></th> |
|||
<!--<th>Actions</th>--> |
|||
</tr> |
|||
</thead> |
|||
<tfoot> |
|||
<tr> |
|||
<th data-lang="INDEX.TYPE"></th> |
|||
<th data-lang="INDEX.ADDRESS"></th> |
|||
<!--<th>Actions</th>--> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!-- End Panel FixedHeader --> |
|||
</div> |
|||
</div> |
|||
<!-- End KMD Wallet Receive --> |
|||
</div> |
|||
<!-- End Komodo Wallet receive tab --> |
|||
</div> |
|||
</div> |
|||
|
|||
<div data-extcoin="COIN" id="kmd_wallet_send" style="display: none"> |
|||
<div class="col-xlg-12 col-md-12 col-sm-12 col-xs-12"> |
|||
<!-- Panel getinfo --> |
|||
<div class="panel" id="projects"> |
|||
<div class="panel-heading"> |
|||
<h3 data-extcoin="COIN" class="panel-title"> |
|||
<span data-lang="INDEX.SEND"></span> <span data-extcoinname="COIN"></span> |
|||
</h3> |
|||
<!--<div class="panel-actions"> |
|||
<a class="panel-action icon md-refresh-alt" data-toggle="panel-refresh" data-load-type="blue-only" |
|||
data-load-callback="KMDSendScreenRefreshCallback" aria-hidden="true"></a> |
|||
</div>--> |
|||
</div> |
|||
<div class="panel-body container-fluid"> |
|||
<form class="extcoin-send-form" data-extcoin="COIN" method="post" role="form" autocomplete="off" onsubmit="return false"> |
|||
<div class="row"> |
|||
<div class="col-xlg-12 form-group form-material"> |
|||
<label class="control-label" data-extcoin="COIN" for="kmd_wallet_send_from" data-lang="INDEX.SEND_FROM"></label> |
|||
<select class="form-control form-material showkmdwalletaddrs show-tick" data-extcoin="COIN" id="kmd_wallet_send_from" title="Select Transparent or Private Address" data-size="5"></select> |
|||
</div> |
|||
<div class="col-xlg-12 form-group form-material"> |
|||
<label class="control-label" data-extcoin="COIN" for="kmd_wallet_sendto" data-lang="INDEX.SEND_TO"></label> |
|||
<input type="text" class="form-control" data-extcoin="COIN" id="kmd_wallet_sendto" name="kmd_wallet_sendto" placeholder="Enter Transparent or Private address" autocomplete="off" required /> |
|||
</div> |
|||
<div class="col-lg-6 form-group form-material"> |
|||
<label class="control-label" for="kmd_wallet_amount" data-extcoin="COIN" id="kmd_wallet_amount_label"> |
|||
<span data-extcoinname="COIN"></span> |
|||
</label> |
|||
<input type="text" class="form-control" data-extcoin="COIN" id="kmd_wallet_amount" name="kmd_wallet_amount" placeholder="0.000" autocomplete="off" /> |
|||
</div> |
|||
<div class="col-lg-6 form-group form-material"> |
|||
<label class="control-label" data-extcoin="COIN" for="kmd_wallet_fee" data-lang="INDEX.FEE"></label> |
|||
<input type="text" class="form-control" data-extcoin="COIN" id="kmd_wallet_fee" name="kmd_wallet_fee" placeholder="0.000" value="0.0001" autocomplete="off" /> |
|||
</div> |
|||
<div class="col-lg-12"> |
|||
<span data-extcoin="KMD"> |
|||
<b><span data-lang="INDEX.TOTAL"></span> (<span data-extcoinname="COIN"></span> - txfee):</b> <span data-extcoin="COIN" id="kmd_wallet_total_value">0.000</span> <span data-extcoin="COIN" id="kmd_wallet_total_coinname" data-extcoinname="COIN"></span> |
|||
</span> |
|||
</div> |
|||
<div class="col-lg-12"> |
|||
<button type="submit" class="btn btn-primary waves-effect waves-light pull-right" data-toggle="modal" id="kmd_wallet_send_coins_btn"> |
|||
<span data-lang="INDEX.SEND"></span> <span data-extcoinname="COIN"></span> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<!-- End Panel getinfo --> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<!-- Komodo Wallet send opid status tab --> |
|||
<div class="row"> |
|||
<div class="panel nav-tabs-horizontal"> |
|||
<!-- KMD opid status --> |
|||
<div data-extcoin="COIN" id="kmd_wallet_opids_status_section"> |
|||
<div class="col-xlg-12 col-lg-12 col-sm-12 col-xs-12"> |
|||
<!-- Panel FixedHeader --> |
|||
<div class="panel"> |
|||
<header class="panel-heading"> |
|||
<div class="panel-actions"> |
|||
<button class="btn btn-info btn-block" id="kmd_opids_status_btn" type="button"> |
|||
<i class="icon fa-repeat" aria-hidden="true"></i> <span data-lang="INDEX.REFRESH"></span> |
|||
</button> |
|||
</div> |
|||
<h3 class="panel-title" data-lang="INDEX.OPERATIONS_STATUSES"></h3> |
|||
</header> |
|||
<div class="panel-body"> |
|||
<!--<p>Receiving addresses info goes here...</p>--> |
|||
<table class="table table-hover dataTable table-striped" data-extcoin="COIN" id="kmd-opid-status-tbl" width="100%"> |
|||
<thead> |
|||
<tr> |
|||
<th data-lang="INDEX.STATUS"></th> |
|||
<th>ID</th> |
|||
<th data-lang="INDEX.TIME"></th> |
|||
<th data-lang="INDEX.RESULT"></th> |
|||
</tr> |
|||
</thead> |
|||
<tfoot> |
|||
<tr> |
|||
<th data-lang="INDEX.STATUS"></th> |
|||
<th>ID</th> |
|||
<th data-lang="INDEX.TIME"></th> |
|||
<th data-lang="INDEX.RESULT"></th> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!-- End Panel FixedHeader --> |
|||
</div> |
|||
</div> |
|||
<!-- End KMD opid status --> |
|||
</div> |
|||
</div> |
|||
<!-- End Komodo Wallet send opid status tab --> |
|||
</div> |
|||
</div> |
|||
|
|||
<div data-extcoin="COIN" id="kmd_wallet_settings" style="display: none"> |
|||
<div class="col-xlg-6 col-md-4"> |
|||
<!-- Panel Wallet Info --> |
|||
<div class="panel" id="projects"> |
|||
<div class="panel-heading"> |
|||
<h3 class="panel-title" data-lang="INDEX.WALLET_INFO"></h3> |
|||
</div> |
|||
<div class="table-responsive"> |
|||
<table class="table table-striped"> |
|||
<tbody> |
|||
<tr> |
|||
<td data-lang="INDEX.WALLET_VERSION"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_walletversion"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.BALANCE"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_balance"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.UNCONFIRMED_BALANCE"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_unconfirmed_balance"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.IMMATURE_BALANCE"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_immature_balance"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.TOTAL_TX_COUNT"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="KMDTotalTransactionsCount"></span> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!-- End Panel Wallet Info --> |
|||
</div> |
|||
<div class="col-xlg-6 col-md-8"> |
|||
<!-- Panel getinfo --> |
|||
<div class="panel" id="projects"> |
|||
<div class="panel-heading"> |
|||
<h3 class="panel-title"> |
|||
<span data-extcointitle="COIN">Komodo</span> <span data-lang="INDEX.INFO"></span> |
|||
</h3> |
|||
</div> |
|||
<div class="table-responsive"> |
|||
<table class="table table-striped"> |
|||
<tbody> |
|||
<tr> |
|||
<td data-lang="INDEX.VERSION"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_version"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.PROTOCOL_VERSION"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_protocolversion"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.NOTARIZED"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_notarized"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span data-lang="INDEX.NOTARIZED"></span> Hash |
|||
</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_notarizedhash"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span data-lang="INDEX.NOTARIZED"></span> BTC |
|||
</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_notarizedbtc"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.BLOCKS"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_blocks"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.CONNECTIONS"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_connections"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.DIFFICULTY"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_difficulty"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Testnet</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_testnet"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.PAY_TX_FEE"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_paytxfee"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.RELAY_FEE"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_relayfee"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td data-lang="INDEX.ERRORS"></td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_errors"></span> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!-- End Panel getinfo --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- Modal --> |
|||
<div class="modal fade modal-3d-sign" data-extcoin="COIN" id="kmd_txid_info_mdl" aria-hidden="false" role="dialog" |
|||
tabindex="-1"> |
|||
<div class="modal-dialog modal-center modal-lg"> |
|||
<div class="modal-content"> |
|||
<!--<div class="modal-header bg-orange-a400 wallet-send-header"> |
|||
<button type="button" class="close white" data-dismiss="modal" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<h4 class="modal-title white"><span class="icon fa-search" style="margin: 0"></span> Transaction ID <span id="mdl_txid_info_coin_name"></span></h4> |
|||
</div>--> |
|||
<div class="modal-body"> |
|||
<!-- Iguana Wallet Settings Box Tab --> |
|||
<div class="panel nav-tabs-horizontal"> |
|||
<ul class="nav nav-tabs nav-tabs-line" data-plugin="nav-tabs" role="tablist"> |
|||
<li class="active" role="presentation"> |
|||
<a data-toggle="tab" href="#KmdTxIDInfotab1" data-extcoin="COIN" aria-controls="KmdTxIDInfotab1" role="tab"> |
|||
<i class="icon md-balance-wallet" aria-hidden="true"></i>TxID Info |
|||
</a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a data-toggle="tab" href="#KmdTxIDInfotab2" data-extcoin="COIN" aria-controls="KmdTxIDInfotab2" role="tab"> |
|||
<i class="icon md-plus-square" aria-hidden="true"></i>vjointsplits, details |
|||
</a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a data-toggle="tab" href="#KmdTxIDInfotab3" data-extcoin="COIN" aria-controls="KmdTxIDInfotab3" role="tab"> |
|||
<i class="icon wb-briefcase" aria-hidden="true"></i>hex |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
<div class="panel-body"> |
|||
<div class="tab-content"> |
|||
<div class="tab-pane active" id="KmdTxIDInfotab1" data-extcoin="COIN" role="tabpanel"> |
|||
<table class="table table-striped"> |
|||
<tbody> |
|||
<tr> |
|||
<td>amount</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_amount"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>fee</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_fee"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>confirmations</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_confirmations"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>blockhash</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_blockhash"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>blockindex</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_blockindex"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>blocktime</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_blocktime"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>txid</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_txid"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>walletconflicts</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_walletconflicts"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>time</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_time"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>timereceived</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_timereceived"></span> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="tab-pane" id="KmdTxIDInfotab2" data-extcoin="COIN" role="tabpanel"> |
|||
<table class="table table-striped"> |
|||
<tbody> |
|||
<tr> |
|||
<td>vjoinsplit</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_vjoinsplit"></span> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>details</td> |
|||
<td> |
|||
<span data-extcoin="COIN" id="kmd_txid_info_details"></span> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="tab-pane" id="KmdTxIDInfotab3" data-extcoin="COIN" role="tabpanel"> |
|||
<textarea id="kmd_txid_info_hex" data-extcoin="COIN" style="width: 100%; height: 170px" rows="10" cols="80" disabled></textarea> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Iguana Wallet Settings Box Tab --> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Modal --> |
|||
</div> |
|||
</div> |
|||
<!-- END KOMODO WALLET CONTENT BODY --> |
|||
`;
|
@ -1,103 +0,0 @@ |
|||
templates.loginPage = |
|||
` |
|||
<!-- BEGIN Login Page --> |
|||
<div id="wallet-login"> |
|||
<div class="page animsition vertical-align text-center" data-animsition-in="fade-in" data-animsition-out="fade-out"> |
|||
<div class="page-content vertical-align-middle"> |
|||
<div class="brand"> |
|||
<img class="brand-img" src="assets/images/easydex-logo-big.png" alt="SuperNET Iguana"> |
|||
</div> |
|||
<!-- BEGIN IE Warning --> |
|||
<div id="section-ie-warning" style="display: none"> |
|||
<!-- Example Panel Alert --> |
|||
<div class="panel"> |
|||
<div class="panel-heading"> |
|||
<h3 class="panel-title" data-lang="INDEX.UNSUPPORTED_BROWSER"></h3> |
|||
</div> |
|||
<div class="alert alert-danger alert-dismissible" role="alert"> |
|||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
<span class="sr-only" data-lang="INDEX.CLOSE">Close</span> |
|||
</button> |
|||
<span data-lang="INDEX.IE_UNSUPPORTED"></span> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<p style="color: #424242"> |
|||
<span data-lang="INDEX.PLEASE_USE"></span> <a href="https://www.google.com/chrome/">Google Chrome</a> <span data-lang="INDEX.OR"></span> <a href="https://www.firefox.com">Mozilla FireFox</a> <span data-lang="INDEX.TO_USE"></span> EasyDEX-GUI. <span data-lang="INDEX.PLEASE_CLICK_ON"></span>.
|
|||
</p> |
|||
<div class="col-sm-6 col-xs-6"> |
|||
<a href="https://www.google.com/chrome/"><img class="brand-img" src="assets/images/browsers/chrome.png" alt="Google Chrome"></a> |
|||
</div> |
|||
<div class="col-sm-6 col-xs-6"> |
|||
<a href="https://www.firefox.com"><img class="brand-img" src="assets/images/browsers/firefox.png" alt="Mozilla FireFox"></a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Example Panel Alert --> |
|||
</div> |
|||
<!-- END IE Warning --> |
|||
<!-- BEGIN section login --> |
|||
<div id="section-login" style="display: none"> |
|||
<h4 style="color: #fff" id="login-welcome" data-lang="INDEX.WELCOME_LOGIN"></h4> |
|||
<form class="login-form" method="post" action="javascript:" autocomplete="off" onsubmit="return false"> |
|||
<div class="form-group form-material floating"> |
|||
<input type="password" class="form-control" name="password" id="password"> |
|||
<label class="floating-label" for="inputPassword" data-lang="INDEX.WALLET_SEED"></label> |
|||
</div> |
|||
<button type="submit" class="btn btn-primary btn-block" id="loginbtn" data-lang="INDEX.SIGN_IN"></button> |
|||
<div class="form-group form-material floating"> |
|||
<button class="btn btn-lg btn-flat btn-block waves-effect" id="register-btn" data-lang="INDEX.CREATE_WALLET"></button> |
|||
<button class="btn btn-lg btn-flat btn-block waves-effect" id="logint-another-wallet" data-lang="INDEX.LOGIN_ANOTHER_WALLET"></button> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<!-- END section login --> |
|||
|
|||
<!-- BEGIN section login add coin --> |
|||
<div id="section-login-addcoin-btn"> |
|||
<h4 style="color: #fff" id="login-welcome" data-lang="INDEX.WELCOME_PLEASE_ADD"></h4> |
|||
<div class="form-group form-material floating" style="width: 540px; margin: 30px 0"> |
|||
<button class="btn btn-lg btn-primary btn-block ladda-button" id="start-coin-login" role="menuitem" data-edexcoinmenu="COIN" data-target="#AddCoinDilogModel-login" data-toggle="modal" data-style="expand-left" data-plugin="ladda"><span class="ladda-label" data-lang="INDEX.ACTIVATE_COIN"></span></button> |
|||
</div> |
|||
</div> |
|||
<!-- END section login add coin --> |
|||
|
|||
<!-- BEGIN section register --> |
|||
<div id="section-register" style="display: none"> |
|||
<form class="register-form" method="post" role="form" autocomplete="off" onsubmit="return false"> |
|||
<h4 class="hint" style="color: #fff"> |
|||
<span data-lang="INDEX.SELECT_SEED_TYPE"></span>: |
|||
</h4> |
|||
<div class="form-group form-material floating"> |
|||
<div class="radio-custom radio-default radio-inline"> |
|||
<input type="radio" id="PassPhraseOptionsIguana" value="PassPhraseOptionsIguana" name="PassPhraseOptions" checked=""> |
|||
<label for="PassPhraseOptionsIguana">Iguana (256 bits)</label> |
|||
</div> |
|||
<div class="radio-custom radio-default radio-inline"> |
|||
<input type="radio" id="PassPhraseOptionsWaves" value="PassPhraseOptionsWaves" name="PassPhraseOptions"> |
|||
<label for="PassPhraseOptionsWaves">Waves</label> |
|||
</div> |
|||
<div class="radio-custom radio-default radio-inline"> |
|||
<input type="radio" id="PassPhraseOptionsNXT" value="PassPhraseOptionsNXT" name="PassPhraseOptions"> |
|||
<label for="PassPhraseOptionsNXT">NXT</label> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-material floating"> |
|||
<textarea class="form-control placeholder-no-fix" type="text" placeholder="" name="walletseed" id="walletseed" style="height: 100px"></textarea> |
|||
<label class="floating-label" for="walletseed" data-lang="INDEX.WALLET_SEED"></label> |
|||
</div> |
|||
<div class="form-group form-material floating"> |
|||
<textarea class="form-control placeholder-no-fix" type="text" placeholder="" name="rwalletseed" id="rwalletseed" style="height: 100px"></textarea> |
|||
<label class="floating-label" for="rwalletseed" data-lang="INDEX.CONFIRM_SEED"></label> |
|||
</div> |
|||
<button type="submit" id="register-submit-btn" class="btn btn-primary btn-block" data-lang="INDEX.REGISTER"></button> |
|||
<div class="form-group form-material floating"> |
|||
<button class="btn btn-lg btn-flat btn-block waves-effect" id="register-back-btn" data-lang="INDEX.BACK_TO_LOGIN"></button> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<!-- END section register --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
`;
|
@ -1,51 +0,0 @@ |
|||
templates.menuBar = |
|||
` |
|||
<div class="site-menubar site-menubar-dark" style="display: none"> |
|||
<div class="site-menubar-body"> |
|||
<ul class="site-menu"> |
|||
<li class="site-menu-item" id="nav-dashboard"> |
|||
<a class="animsition-link" href="javascript:"> |
|||
<i class="site-menu-icon md-view-dashboard" aria-hidden="true"></i> |
|||
<span class="site-menu-title" data-lang="INDEX.DASHBOARD"></span> |
|||
</a> |
|||
</li> |
|||
<li class="site-menu-item" id="nav-easydex"> |
|||
<a class="animsition-link" href="javascript:"> |
|||
<i class="site-menu-icon fa-exchange" aria-hidden="true"></i> |
|||
<span class="site-menu-title">EasyDEX</span> |
|||
</a> |
|||
</li> |
|||
<li class="site-menu-item" id="nav-komodo-wallet"> |
|||
<a class="animsition-link" href="javascript:"> |
|||
<i class="site-menu-icon" aria-hidden="true"><img src="assets/images/icons/komodo_icon_grey.png" alt="" style="width: 25px"></i> |
|||
<span class="site-menu-title" data-lang="INDEX.KMD_WALLET"></span> |
|||
</a> |
|||
</li> |
|||
<li class="site-menu-item" id="nav-zcash-wallet"> |
|||
<a class="animsition-link" href="javascript:"> |
|||
<i class="site-menu-icon" aria-hidden="true"><img src="assets/images/icons/zcash_icon_grey.png" alt="" style="width: 25px"></i> |
|||
<span class="site-menu-title" data-lang="INDEX.ZC_WALLET"></span> |
|||
</a> |
|||
</li> |
|||
<li class="site-menu-item" id="nav-iguana-atomic-explorer"> |
|||
<a class="animsition-link" href="javascript:"> |
|||
<i class="site-menu-icon fa-cubes" aria-hidden="true"></i> |
|||
<span class="site-menu-title">Atomic Explorer</span> |
|||
</a> |
|||
</li> |
|||
<li class="site-menu-item" id="nav-iguana-wallet-settings"> |
|||
<a class="animsition-link" href="javascript:"> |
|||
<i class="site-menu-icon icon md-settings" aria-hidden="true"></i> |
|||
<span class="site-menu-title" data-lang="INDEX.WALLET_SETTINGS"></span> |
|||
</a> |
|||
</li> |
|||
<li class="site-menu-item" id="nav-about-iguana"> |
|||
<a class="animsition-link" href="javascript:"> |
|||
<i class="site-menu-icon fa-info-circle" aria-hidden="true"></i> |
|||
<span class="site-menu-title" data-lang="INDEX.ABOUT_IGUANA"></span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
`;
|
@ -1,102 +0,0 @@ |
|||
templates.navBar = |
|||
` |
|||
<nav class="site-navbar navbar navbar-default navbar-fixed-top navbar-mega" role="navigation"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle hamburger hamburger-close navbar-toggle-left hided" |
|||
data-toggle="menubar"> |
|||
<span class="sr-only" data-lang="INDEX.TOGGLE_NAV"></span> |
|||
<span class="hamburger-bar"></span> |
|||
</button> |
|||
<button type="button" class="navbar-toggle collapsed" data-target="#site-navbar-collapse" |
|||
data-toggle="collapse"> |
|||
<i class="icon md-more" aria-hidden="true"></i> |
|||
</button> |
|||
<div class="navbar-brand navbar-brand-center site-gridmenu-toggle" data-toggle="gridmenu"> |
|||
<img class="navbar-brand-logo hidden-xs" src="assets/images/easydex-logo-dashboard.png" title="SuperNET Igauana"> |
|||
<img class="navbar-brand-logo hidden-md hidden-sm hidden-lg" src="assets/images/easydex-logo-dashboard-white.png" title="SuperNET Igauana white"> |
|||
<span class="navbar-brand-text hidden-xs"></span> |
|||
</div> |
|||
<button type="button" class="navbar-toggle collapsed" data-target="#site-navbar-search" |
|||
data-toggle="collapse"> |
|||
<span class="sr-only" data-lang="INDEX.TOGGLE_SEARCH"></span> |
|||
<i class="icon md-search" aria-hidden="true"></i> |
|||
</button> |
|||
</div> |
|||
<div class="navbar-container container-fluid"> |
|||
<!-- Navbar Collapse --> |
|||
<div class="collapse navbar-collapse navbar-collapse-toolbar" id="site-navbar-collapse"> |
|||
<!-- Navbar Toolbar --> |
|||
<ul class="nav navbar-toolbar"> |
|||
<li class="hidden-float" id="toggleMenubar" style="display: none"> |
|||
<a data-toggle="menubar" href="#" role="button"> |
|||
<i class="icon hamburger hamburger-arrow-left"> |
|||
<span class="sr-only" data-lang="INDEX.TOGGLE_MENUBAR"></span> |
|||
<span class="hamburger-bar"></span> |
|||
</i> |
|||
</a> |
|||
</li> |
|||
<li class="active nav-top-menu"> |
|||
<a href="javascript:void(0)" id="nav-dashboard"> |
|||
<i class="site-menu-icon" aria-hidden="true"></i> <span data-lang="INDEX.WALLETS"></span> |
|||
</a> |
|||
</li> |
|||
<li class="nav-top-menu"> |
|||
<a href="javascript:void(0)" id="nav-easydex"> |
|||
<i class="site-menu-icon" aria-hidden="true"></i> EasyDEX |
|||
</a> |
|||
</li> |
|||
<li class="nav-top-menu"> |
|||
<a href="javascript:void(0)" id="nav-jumblr"> |
|||
<i class="site-menu-icon" aria-hidden="true"></i> Jumblr |
|||
</a> |
|||
</li> |
|||
<!--<li class="nav-top-menu"><a href="javascript:void(0)" id="nav-assetchains"><i class="site-menu-icon" aria-hidden="true"></i> Assetchains</a></li> |
|||
<li class="nav-top-menu"><a href="javascript:void(0)" id="nav-pax"><i class="site-menu-icon" aria-hidden="true"></i> PAX</a></li>--> |
|||
<li class="nav-top-menu"><a href="javascript:void(0)" id="nav-iguana-atomic-explorer"> |
|||
<i class="site-menu-icon" aria-hidden="true"></i> Atomic Explorer</a> |
|||
</li> |
|||
</ul> |
|||
<!-- End Navbar Toolbar --> |
|||
<!-- Navbar Toolbar Right --> |
|||
<ul class="nav navbar-toolbar navbar-right navbar-toolbar-right"> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" data-edexcoinmenu="COIN" id="btn_edexcoin_addcoin" data-target="#AddCoinDilogModel" data-toggle="modal" style="padding-bottom: 10px; padding-top: 16px"> |
|||
<span> |
|||
<img src="assets/images/icons/activatecoin.png" alt="Add Coin"> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
<li class="dropdown"> |
|||
<a class="navbar-avatar dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false" |
|||
data-animation="scale-up" role="button"> |
|||
<span class="avatar avatar-online"> |
|||
<img src="assets/images/iguana_profile_02.jpg" alt="iguana profile pic"> |
|||
<i></i> |
|||
</span> |
|||
</a> |
|||
<ul class="dropdown-menu" role="menu"> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" id="nav-iguana-wallet-settings"> |
|||
<i class="icon md-settings" aria-hidden="true"></i> <span data-lang="INDEX.SETTINGS"></span> |
|||
</a> |
|||
</li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" id="nav-about-iguana"> |
|||
<i class="icon md-settings" aria-hidden="true"></i> <span data-lang="INDEX.ABOUT_IGUANA"></span> |
|||
</a> |
|||
</li> |
|||
<li class="divider" role="presentation"></li> |
|||
<li role="presentation"> |
|||
<a href="javascript:void(0)" role="menuitem" id="logout-account"> |
|||
<i class="icon md-power" aria-hidden="true"></i> <span data-lang="INDEX.LOGOUT"></span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</li> |
|||
</ul> |
|||
<!-- End Navbar Toolbar Right --> |
|||
</div> |
|||
<!-- End Navbar Collapse --> |
|||
</div> |
|||
</nav> |
|||
`;
|
@ -1,7 +0,0 @@ |
|||
templates.nprogressBar = |
|||
` |
|||
<div class="bar nprogress-bar-header nprogress-bar-info" role="bar"></div> |
|||
<div class="spinner" role="spinner"> |
|||
<div class="spinner-icon"></div> |
|||
</div> |
|||
`;
|
@ -1,67 +0,0 @@ |
|||
templates.refreshBasiliskConnectionsModal = |
|||
` |
|||
<!-- START ADD COIN DIV --> |
|||
<div> |
|||
<!-- Modal --> |
|||
<div class="modal fade modal-3d-sign" id="RefreshBasiliskConnectionsMdl" aria-hidden="false" role="dialog" |
|||
tabindex="-1"> |
|||
<div class="modal-dialog modal-center modal-md"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header bg-orange-a400 wallet-send-header" style="border-radius: 3px 3px 0 0"> |
|||
<h4 class="modal-title white"> |
|||
<span class="icon fa-refresh" style="margin: 0"></span> <span data-lang="INDEX.REFRESHING_BASILISK_NET"></span>... <span id="mdl_receive_coin_name"></span> |
|||
</h4> |
|||
<!--<span class="white">This is your default Iguana wallet address.</span>--> |
|||
</div> |
|||
<div class="modal-body" style="text-align: center"> |
|||
<div class="loader-wrapper active" style="display: none"> |
|||
<div class="loader-layer loader-blue"> |
|||
<div class="loader-circle-left"> |
|||
<div class="circle"></div> |
|||
</div> |
|||
<div class="loader-circle-gap"></div> |
|||
<div class="loader-circle-right"> |
|||
<div class="circle"></div> |
|||
</div> |
|||
</div> |
|||
<div class="loader-layer loader-red"> |
|||
<div class="loader-circle-left"> |
|||
<div class="circle"></div> |
|||
</div> |
|||
<div class="loader-circle-gap"></div> |
|||
<div class="loader-circle-right"> |
|||
<div class="circle"></div> |
|||
</div> |
|||
</div> |
|||
<div class="loader-layer loader-green"> |
|||
<div class="loader-circle-left"> |
|||
<div class="circle"></div> |
|||
</div> |
|||
<div class="loader-circle-gap"></div> |
|||
<div class="loader-circle-right"> |
|||
<div class="circle"></div> |
|||
</div> |
|||
</div> |
|||
<div class="loader-layer loader-yellow"> |
|||
<div class="loader-circle-left"> |
|||
<div class="circle"></div> |
|||
</div> |
|||
<div class="loader-circle-gap"></div> |
|||
<div class="loader-circle-right"> |
|||
<div class="circle"></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<h5 class="text-left"> |
|||
<span id="basilisk-connections-refresh-title">-</span> <span class="pull-right" id="basilisk-connections-refresh-percent">-</span> |
|||
</h5> |
|||
<div class="progress progress-sm"> |
|||
<div class="progress-bar progress-bar-info progress-bar-striped active" style="width: 0%; font-size: 80%" role="progressbar" data-edexcoin="COIN" id="basilisk-connections-refresh-progress-bar"></div> |
|||
</div> |
|||
<pre data-edexcoin="COIN" id="basilisk-connections-refresh-status-output"></pre> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Modal --> |
|||
`;
|
@ -1,152 +0,0 @@ |
|||
templates.sendCoin = |
|||
` |
|||
<div class="col-sm-12 padding-top-10" data-edexcoin="COIN" id="edexcoin_send" style="display: none"> |
|||
<div class="col-xlg-12 col-md-12 col-sm-12 col-xs-12"> |
|||
<!-- EasyDEX Panel send --> |
|||
<!-- Sending EDEXCoin Steps Default --> |
|||
<div class="steps row" style="margin-top: 10px"> |
|||
<div class="step col-md-4 current" id="edexcoin_send_step_1"> |
|||
<span class="step-number">1</span> |
|||
<div class="step-desc"> |
|||
<span class="step-title" data-lang="INDEX.FILL_SEND_FORM"></span> |
|||
<p data-lang="INDEX.FILL_SEND_DETAILS"></p> |
|||
</div> |
|||
</div> |
|||
<div class="step col-md-4" id="edexcoin_send_step_2"> |
|||
<span class="step-number">2</span> |
|||
<div class="step-desc"> |
|||
<span class="step-title" data-lang="INDEX.CONFIRMING"></span> |
|||
<p data-lang="INDEX.CONFIRM_DETAILS"></p> |
|||
</div> |
|||
</div> |
|||
<div class="step col-md-4" id="edexcoin_send_step_3"> |
|||
<span class="step-number">3</span> |
|||
<div class="step-desc"> |
|||
<span class="step-title" data-lang="INDEX.PROCESSING_TX"></span> |
|||
<p data-lang="INDEX.PROCESSING_DETAILS"></p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Sending EDEXCoin Steps Default --> |
|||
|
|||
<div class="panel" id="edexcoin-send-screen"> |
|||
<div class="panel-heading"> |
|||
<h3 data-edexcoin="COIN" class="panel-title"> |
|||
<span data-lang="INDEX.SEND"> <span data-edexcoin="COIN"></span> |
|||
</h3> |
|||
<div class="panel-actions"> |
|||
<a href="javascript:void(0)" class="dropdown-toggle white btn-xs btn-info btn_refresh_edexcoin_send" data-edexcoin="COIN" aria-expanded="false" role="button"> |
|||
<i class="icon fa-refresh margin-right-10" aria-hidden="true"></i> <span data-lang="INDEX.REFRESH_FUNDS"></span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="panel-body container-fluid"> |
|||
<form class="edexcoin-send-form" data-edexcoin="COIN" method="post" role="form" autocomplete="off" onsubmit="return false"> |
|||
<div class="row"> |
|||
<div class="col-xlg-12 form-group form-material edexcoin_send_from_for_basilisk"> |
|||
<label class="control-label" data-edexcoin="COIN" for="edexcoin_send_from" data-lang="INDEX.SEND_FROM"></label> |
|||
<select class="form-control form-material showedexcoinaddrs show-tick" data-edexcoin="COIN" id="edexcoin_send_from" title="Select Transparent or Private Address" data-size="5"></select> |
|||
</div> |
|||
<div class="col-xlg-12 form-group form-material"> |
|||
<label class="control-label" data-edexcoin="COIN" for="edexcoin_sendto" data-lang="INDEX.SEND_TO"></label> |
|||
<input type="text" class="form-control" data-edexcoin="COIN" id="edexcoin_sendto" name="edexcoin_sendto" placeholder="Enter address" autocomplete="off" required /> |
|||
</div> |
|||
<div class="col-lg-6 form-group form-material"> |
|||
<label class="control-label" for="edexcoin_amount" data-edexcoin="COIN" id="edexcoin_amount_label"> |
|||
<span data-edexcoin="COIN"></span> |
|||
</label> |
|||
<input type="text" class="form-control" data-edexcoin="COIN" id="edexcoin_amount" name="edexcoin_amount" placeholder="0.000" autocomplete="off" /> |
|||
</div> |
|||
<div class="col-lg-6 form-group form-material"> |
|||
<label class="control-label" data-edexcoin="COIN" for="edexcoin_fee" data-lang="INDEX.FEE">Fee</label> |
|||
<input type="text" class="form-control" data-edexcoin="COIN" id="edexcoin_fee" name="edexcoin_fee" placeholder="0.000" value="0.0001" autocomplete="off" /> |
|||
</div> |
|||
<div class="col-lg-12"> |
|||
<span data-edexcoin="KMD"> |
|||
<b><span data-lang="INDEX.TOTAL"></span> (<span data-edexcoin="COIN" data-lang="INDEX.AMOUNT_SM"></span> - txfee):</b> <span data-edexcoin="COIN" id="edexcoin_total_value">0.000</span> <span data-edexcoin="COIN" id="edexcoin_total_coinname" data-edexcoin="COIN"></span> |
|||
</span> |
|||
</div> |
|||
<div class="col-lg-10 margin-top-10"> |
|||
<div class="pull-left margin-right-10"> |
|||
<input type="checkbox" id="edexcoin_send_sig" name="edexcoin_send_sig" data-plugin="switchery" data-size="small" /> |
|||
</div> |
|||
<label class="padding-top-3" for="edexcoin_send_sig" data-lang="INDEX.DONT_SEND"></label> |
|||
</div> |
|||
<div class="col-lg-2"> |
|||
<button type="submit" class="btn btn-primary waves-effect waves-light pull-right edexcoin_send_coins_btn_step1"> |
|||
<span data-lang="INDEX.SEND"></span> <span data-edexcoin="COIN"></span> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- EasyDEX Panel confirm send panel --> |
|||
<div class="col-xlg-12 col-md-12 col-sm-12 col-xs-12"> |
|||
<div class="panel" id="edexcoin-send-confirm-screen" style="display: none"> |
|||
<div class="panel-body"> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<b data-lang="INDEX.TO"></b> |
|||
</div> |
|||
<div class="col-lg-6 col-sm-6 col-xs-12" id="mdl_confirm_currency_sendto_addr">[coin-address-goes-here]</div> |
|||
<div class="col-lg-6 col-sm-6 col-xs-6"> |
|||
<span id="mdl_confirm_currency_send_amount">0.00000000</span> <span id="mdl_confirm_currency_coinname">[COIN]</span> |
|||
</div> |
|||
<!--<div class="col-lg-2 col-sm-2 col-xs-6" id="mdl_confirm_currency_send_amount_fiat">$0.00</div>--> |
|||
<div class="col-lg-6 col-sm-6 col-xs-12" data-lang="INDEX.TX_FEE_REQ"></div> |
|||
<div class="col-lg-6 col-sm-6 col-xs-6"> |
|||
<span id="mdl_confirm_currency_send_fee">0.00000000</span> <span id="mdl_confirm_currency_coinname_fee">[COIN]</span> |
|||
</div> |
|||
<!--<div class="col-lg-2 col-sm-2 col-xs-6" id="mdl_confirm_currency_send_fee_fiat">$0.00</div>--> |
|||
</div> |
|||
<br> |
|||
|
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<b data-lang="INDEX.FROM"></b> |
|||
</div> |
|||
<div class="col-lg-6 col-sm-6 col-xs-12" id="mdl_confirm_currency_sendfrom_addr">[coin-address-goes-here]</div> |
|||
<div class="col-lg-6 col-sm-6 col-xs-6" style="color: #f44336"> |
|||
<span id="mdl_confirm_currency_sendfrom_total_dedcut">-0.00000000</span> <span id="mdl_confirm_currency_coinname_total">[COIN]</span> |
|||
</div> |
|||
<!--<div class="col-lg-2 col-sm-2 col-xs-6" id="mdl_confirm_currency_sendfrom_total_deduct_fiat" style="color: #f44336">-$0.00</div>--> |
|||
</div> |
|||
<div class="widget-body-footer"> |
|||
<a class="btn btn-default waves-effect waves-light" id="edexcoin_send_coins_back_btn" data-lang="INDEX.BACK"></a> |
|||
<div class="widget-actions pull-right"> |
|||
<button type="button" class="btn btn-primary" id="edexcoin_send_coins_btn" data-lang="INDEX.CONFIRM"></button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- EasyDEX Panel confirm send panel --> |
|||
|
|||
<!-- EasyDEX Panel send info panel --> |
|||
<div class="col-xlg-12 col-md-12 col-sm-12 col-xs-12"> |
|||
<div class="panel" id="edexcoin-send-txdetails-screen" style="display: none"> |
|||
<div class="panel-heading"> |
|||
<h4 class="panel-title" data-lang="INDEX.TRANSACTION_RESULT"></h4> |
|||
<table class="table table-hover table-striped edexcoin_sendto_result" data-edexcoin="COIN" id="edexcoin_sendto_result"> |
|||
<thead> |
|||
<tr> |
|||
<th data-lang="INDEX.KEY"></th> |
|||
<th data-lang="INDEX.INFO"></th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
</tbody> |
|||
</table> |
|||
<div class="widget-body-footer"> |
|||
<div class="widget-actions margin-bottom-15 margin-right-15"> |
|||
<button type="button" class="btn btn-primary" id="edexcoin_send_coins_anothertx_btn" data-lang="INDEX.MAKE_ANOTHER_TX"></button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- EasyDEX Panel send info panel --> |
|||
</div> |
|||
`;
|
@ -1,84 +0,0 @@ |
|||
templates.walletBalanceWidget = |
|||
` |
|||
<div class="" id="wallet-widgets" data-plugin="masonry" data-edexcoin="COIN" style="display: none"> |
|||
<div class="col-xs-12"> |
|||
<div class="col-xs-12"> |
|||
<div role="alert" class="alert alert-info alert-dismissible" data-edexcoin="COIN" id="edexcoin-wallet-waitingrt-alert" style="display: none"> |
|||
<button aria-label="Close" data-dismiss="alert" class="close" type="button"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<h4 data-lang="INDEX.ACTIVATING_WALLET_RT"></h4> |
|||
<p data-edexcoin="COIN" id="edexcoin-wallet-waitingrt-alert-text" data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P1"></p> |
|||
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P2"></p> |
|||
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P3" style="font-weight: 600"></p> |
|||
</div> |
|||
|
|||
<div role="alert" class="alert alert-info alert-dismissible" data-edexcoin="COIN" id="edexcoin-wallet-waitingcache-alert" style="display: none"> |
|||
<button aria-label="Close" data-dismiss="alert" class="close" type="button"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
<h4 data-lang="INDEX.FETCHING_COIN_DATA"></h4> |
|||
<p data-edexcoin="COIN" id="edexcoin-wallet-waitingcache-alert-text" data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P1"></p> |
|||
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P2"></p> |
|||
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P3" style="font-weight: 600"></p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_t"> |
|||
<!-- EasyDEX Total Balance Widget--> |
|||
<div class="widget widget-shadow" id="widgetLineareaOne"> |
|||
<div class="widget-content"> |
|||
<div class="padding-20 padding-top-10"> |
|||
<div class="clearfix"> |
|||
<div class="pull-left padding-vertical-10"> |
|||
<i class="icon fa-eye font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.BALANCE"></span> |
|||
</div> |
|||
<span class="pull-right padding-top-10" data-edexcoin="COIN" style="font-size: 22px"> |
|||
<span data-edexcoin="COIN" id="edex_total_balance"></span> <span data-edexcoin="COIN" id="edex_total_balance_coincode"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End EasyDEX Total Balance Widget --> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_interest" style="display: none"> |
|||
<!-- EasyDEX Interest Balance Widget--> |
|||
<div class="widget widget-shadow" id="widgetLineareaOne"> |
|||
<div class="widget-content"> |
|||
<div class="padding-20 padding-top-10"> |
|||
<div class="clearfix"> |
|||
<div class="pull-left padding-vertical-10"> |
|||
<i class="icon fa-money font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.INTEREST_EARNED"></span> |
|||
</div> |
|||
<span class="pull-right padding-top-10" data-edexcoin="COIN" style="font-size: 22px"> |
|||
<span data-edexcoin="COIN" id="edex_interest_balance"></span> <span data-edexcoin="COIN" id="edex_total_interest_coincode"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End EasyDEX Interest Balance Widget --> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_total_interest" style="display: none"> |
|||
<!-- EasyDEX Total Balance Widget--> |
|||
<div class="widget widget-shadow" id="widgetLineareaOne"> |
|||
<div class="widget-content"> |
|||
<div class="padding-20 padding-top-10"> |
|||
<div class="clearfix"> |
|||
<div class="pull-left padding-vertical-10"> |
|||
<i class="icon fa-bullseye font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.TOTAL_BALANCE"></span> |
|||
</div> |
|||
<span class="pull-right padding-top-10" data-edexcoin="COIN" style="font-size: 22px"> |
|||
<span data-edexcoin="COIN" id="edex_total_balance_interest"></span> <span data-edexcoin="COIN" id="edex_total_balance_interest_coincode"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End EasyDEX Total Balance Widget --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
`;
|
@ -1,275 +0,0 @@ |
|||
templates.walletSettings = |
|||
` |
|||
<!-- BEGIN IGUANA WALLET SETTINGS CONTENT BODY --> |
|||
<div class="page animsition" data-animsition-in="fade-in" data-animsition-out="fade-out" style="margin-left: 0px"> |
|||
<div class="page-content" id="section-iguana-wallet-settings"> |
|||
<div class="row" id="iguana-wallet-settings" data-plugin="masonry"> |
|||
<div class="col-xlg-12 col-md-12"> |
|||
<!-- Iguana Wallet Settings Box --> |
|||
<div class="row" id="iguana-wallet-settings" data-plugin="masonry"> |
|||
<div class="col-xlg-12 col-md-12"> |
|||
<h4 class="font-size-14 text-uppercase" data-lang="INDEX.WALLET_SETTINGS"></h4> |
|||
<div class="panel-group" id="SettingsAccordion" aria-multiselectable="true" |
|||
role="tablist"> |
|||
<div class="panel"> |
|||
<div class="panel-heading" id="WalletInfo" role="tab"> |
|||
<a class="panel-title" data-toggle="collapse" href="#WalletInfoTab" data-parent="#SettingsAccordion" aria-expanded="true" aria-controls="WalletInfoTab"> |
|||
<i class="icon md-balance-wallet" aria-hidden="true"></i><span data-lang="INDEX.WALLET_INFO"></span> |
|||
</a> |
|||
</div> |
|||
<div class="panel-collapse collapse in" id="WalletInfoTab" aria-labelledby="WalletInfo" |
|||
role="tabpanel"> |
|||
<div class="panel-body"> |
|||
<table class="table" id="wallet-info-table"> |
|||
<thead> |
|||
<tr> |
|||
<th width="10%" data-lang="INDEX.KEY"></th> |
|||
<th data-lang="INDEX.VALUE"></th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr> |
|||
<td style="font-weight: bold">pubkey</td> |
|||
<td> |
|||
<div id="winfo_pubkey_value"></div> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td style="font-weight: bold">btcpubkey</td> |
|||
<td> |
|||
<div id="winfo_btcpubkey_value"></div> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td style="font-weight: bold">rmd160</td> |
|||
<td> |
|||
<div id="winfo_rmd160_value"></div> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td style="font-weight: bold">NXT</td> |
|||
<td> |
|||
<div id="winfo_NXT_value"></div> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td style="font-weight: bold">notary</td> |
|||
<td> |
|||
<div id="winfo_notary_value"></div> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td style="font-weight: bold">status</td> |
|||
<td> |
|||
<div id="winfo_status_value"></div> |
|||
</td> |
|||
</tr> |
|||
<!--<tr><td style="font-weight: bold">duration</td><td><div id="winfo_duration_value"></div></td></tr>--> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel"> |
|||
<div class="panel-heading" id="AddNodeforCoin" role="tab"> |
|||
<a class="panel-title collapsed" data-toggle="collapse" href="#AddNodeforCoinTab" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="AddNodeforCoinTab"> |
|||
<i class="icon md-plus-square" aria-hidden="true"></i><span data-lang="INDEX.ADD_NODE"></span> |
|||
</a> |
|||
</div> |
|||
<div class="panel-collapse collapse" id="AddNodeforCoinTab" aria-labelledby="AddNodeforCoin" |
|||
role="tabpanel"> |
|||
<div class="panel-body"> |
|||
<div class="row"> |
|||
<div class="col-sm-6"> |
|||
<div class="col-sm-12"> |
|||
<p data-lang="INDEX.USE_THIS_SECTION"></p> |
|||
</div> |
|||
<div class="col-sm-8 col-xs-12"> |
|||
<div class="form-group"> |
|||
<select class="form-control form-material" id="settings_select_coin_options"> |
|||
<option data-lang="INDEX.SELECT_COIN"></option> |
|||
${templates.addCoinOptions} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-4 col-xs-12" style="text-align: center"> |
|||
<button type="button" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="settings_getcoinpeers_btn" onclick="Settings_ShowCoinPeers()" data-lang="INDEX.CHECK_NODES"></button> |
|||
</div> |
|||
<div class="col-sm-12"> |
|||
<h5> |
|||
SuperNET Peers: <span id="coin_supernetpeers_h"></span> |
|||
</h5> |
|||
<p id="coin_supernetpeers"></p> |
|||
<h5> |
|||
Raw Peers: <span id="coin_rawpeers_h"></span> |
|||
</h5> |
|||
<p id="coin_rawpeers"></p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-sm-6"> |
|||
<div class="col-sm-12"> |
|||
<p data-lang="INDEX.USE_THIS_SECTION_PEER"></p> |
|||
</div> |
|||
<div class="col-sm-8 col-xs-12"> |
|||
<div class="form-group"> |
|||
<select class="form-control form-material" id="settings_select_coin_addpeer_options"> |
|||
<option data-lang="INDEX.SELECT_COIN"></option> |
|||
${templates.addCoinOptions} |
|||
</select> |
|||
</div> |
|||
<div class="form-group"> |
|||
<input type="text" class="form-control" id="settings_add_peer_ip" name="settings_add_peer_ip" placeholder="Add Peer IP"> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-4 col-xs-12" style="text-align: center"> |
|||
<button type="button" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="settings_addcoinpeers_btn" onclick="Settings_AddCoinPeers()" data-lang="INDEX.ADD_NODE"></button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel"> |
|||
<div class="panel-heading" id="DumpWallet" role="tab"> |
|||
<a class="panel-title collapsed" data-toggle="collapse" href="#DumpWalletTab" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="DumpWalletTab"> |
|||
<i class="icon wb-briefcase" aria-hidden="true"></i><span data-lang="INDEX.WALLET_BACKUP"></span> |
|||
</a> |
|||
</div> |
|||
<div class="panel-collapse collapse" id="DumpWalletTab" aria-labelledby="DumpWallet" |
|||
role="tabpanel"> |
|||
<div class="panel-body">Wallet Backup section to be updated soon.</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel"> |
|||
<div class="panel-heading" id="FiatCurrencySettings" role="tab"> |
|||
<a class="panel-title collapsed" data-toggle="collapse" href="#FiatCurrencySettingsTab" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="FiatCurrencySettingsTab"> |
|||
<i class="icon fa-money" aria-hidden="true"></i><span data-lang="INDEX.FIAT_CURRENCY"></span> |
|||
</a> |
|||
</div> |
|||
<div class="panel-collapse collapse" id="FiatCurrencySettingsTab" aria-labelledby="FiatCurrencySettings" role="tabpanel"> |
|||
<div class="panel-body">Fiat currency settings section to be updated soon.</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel"> |
|||
<div class="panel-heading" id="ExportKeys" role="tab"> |
|||
<a class="panel-title collapsed" data-toggle="collapse" href="#ExportKeysTab" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="ExportKeysTab"> |
|||
<i class="icon md-key" aria-hidden="true"></i><span data-lang="INDEX.EXPORT_KEYS"></span> |
|||
</a> |
|||
</div> |
|||
<div class="panel-collapse collapse" id="ExportKeysTab" aria-labelledby="ExportKeys" |
|||
role="tabpanel"> |
|||
<div class="panel-body"> |
|||
<p> |
|||
<div data-lang="INDEX.ONLY_ACTIVE_WIF_KEYS"></div><br/> |
|||
<b> |
|||
<i data-lang="INDEX.PLEASE_KEEP_KEYS_SAFE"></i> |
|||
</b> |
|||
</p> |
|||
<div class="col-sm-12"></div> |
|||
<form class="wifkeys-form" method="post" action="javascript:" autocomplete="off" onsubmit="return false"> |
|||
<div class="form-group form-material floating"> |
|||
<input type="password" class="form-control" name="wifkeys_passphrase" id="wifkeys_passphrase"> |
|||
<label class="floating-label" for="wifkeys_passphrase" data-lang="INDEX.PASSPHRASE"></label> |
|||
</div> |
|||
<div class="col-sm-12 col-xs-12" style="text-align: center"> |
|||
<button type="submit" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="wifkeys_passphrase_btn" data-lang="INDEX.GET_WIF_KEYS"></button> |
|||
</div> |
|||
</form> |
|||
|
|||
<div class="col-sm-12" style="padding-top: 15px"> |
|||
<div class="row" id="wif-priv-keys" data-plugin="masonry"> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel"> |
|||
<div class="panel-heading" id="ImportKeys" role="tab"> |
|||
<a class="panel-title collapsed" data-toggle="collapse" href="#ImportKeysTab" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="ImportKeysTab"> |
|||
<i class="icon md-key" aria-hidden="true"></i><span data-lang="INDEX.IMPORT_KEYS"></span> |
|||
</a> |
|||
</div> |
|||
<div class="panel-collapse collapse" id="ImportKeysTab" aria-labelledby="ImportKeys" |
|||
role="tabpanel"> |
|||
<div class="panel-body"> |
|||
<p> |
|||
<div data-lang="INDEX.IMPORT_KEYS_DESC_P1"></div><br/> |
|||
<div data-lang="INDEX.IMPORT_KEYS_DESC_P2"></div><br/> |
|||
<div data-lang="INDEX.IMPORT_KEYS_DESC_P3"></div><br/> |
|||
<b> |
|||
<i data-lang="INDEX.PLEASE_KEEP_KEYS_SAFE"></i> |
|||
</b> |
|||
</p> |
|||
<div class="col-sm-12"></div> |
|||
<form class="wifkeys-import-form" method="post" action="javascript:" autocomplete="off" onsubmit="return false"> |
|||
<div class="form-group form-material floating"> |
|||
<input type="text" class="form-control" name="import_wifkey" id="import_wifkey"> |
|||
<label class="floating-label" for="import_wifkey" data-lang="INDEX.INPUT_PRIV_KEY"></label> |
|||
</div> |
|||
<div class="col-sm-12 col-xs-12" style="text-align: center"> |
|||
<button type="submit" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="import_wifkey_btn" data-lang="INDEX.IMPORT_PRIV_KEY"></button> |
|||
</div> |
|||
</form> |
|||
<div class="col-sm-12" style="padding-top: 15px"> |
|||
<div class="row" id="wif-priv-keys" data-plugin="masonry"> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel"> |
|||
<div class="panel-heading" id="DebugLog" role="tab"> |
|||
<a class="panel-title collapsed" data-toggle="collapse" href="#DebugLogTab" data-parent="#SettingsAccordion" aria-expanded="false" aria-controls="DebugLogTab"> |
|||
<i class="icon md-info" aria-hidden="true"></i><span data-lang="INDEX.DEBUG_LOG"></span> |
|||
</a> |
|||
</div> |
|||
<div class="panel-collapse collapse" id="DebugLogTab" aria-labelledby="DebugLog" |
|||
role="tabpanel"> |
|||
<div class="panel-body"> |
|||
<p data-lang="INDEX.DEBUG_LOG_DESC"></p> |
|||
<div class="col-sm-12"></div> |
|||
<form class="read-debug-log-import-form" method="post" action="javascript:" autocomplete="off" onsubmit="return false"> |
|||
<div class="form-group form-material floating"> |
|||
<input type="text" class="form-control" name="read_debug_log_lines" id="read_debug_log_lines" value="10"> |
|||
<label class="floating-label" for="read_debug_log_lines" data-lang="INDEX.DEBUG_LOG_LINES"></label> |
|||
</div> |
|||
<div class="form-group form-material floating"> |
|||
<select class="form-control form-material" id="settings_select_debuglog_options"> |
|||
<option value="iguana">Iguana</option> |
|||
<option value="komodo">Komodo</option> |
|||
</select> |
|||
<label class="floating-label" for="settings_select_debuglog_options" data-lang="INDEX.TARGET"></label> |
|||
</div> |
|||
<div class="col-sm-12 col-xs-12" style="text-align: center"> |
|||
<button type="submit" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-dismiss="modal" id="read_debug_log_btn" onclick="Settings_LoadDebugLog()" data-lang="INDEX.LOAD_DEBUG_LOG"></button> |
|||
</div> |
|||
<div class="col-sm-12 col-xs-12" style="text-align: center"> |
|||
<br/> |
|||
<textarea id="read_debug_log_textarea" style="width:100%;height:200px"></textarea> |
|||
</div> |
|||
</form> |
|||
<div class="col-sm-12" style="padding-top: 15px"> |
|||
<div class="row" id="wif-priv-keys" data-plugin="masonry"></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Iguana Wallet Settings Box --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END IGUANA WALLET SETTINGS CONTENT BODY --> |
|||
`;
|
@ -1,40 +0,0 @@ |
|||
templates.walletWidgetsSidebar = |
|||
` |
|||
<!-- Wallet Widgets Sidebar --> |
|||
<div class="page-aside"> |
|||
<div class="page-aside-switch"> |
|||
<i class="icon md-chevron-left" aria-hidden="true"></i> |
|||
<i class="icon md-chevron-right" aria-hidden="true"></i> |
|||
</div> |
|||
<div class="page-aside-inner"> |
|||
<!-- Search Panel --> |
|||
<div class="search-wallet-widgets panel" style="display: none"> |
|||
<div class="panel-heading"> |
|||
<div class="panel-actions"> |
|||
<div class="input-search input-group-sm"> |
|||
<button type="submit" class="input-search-btn"> |
|||
<i class="icon md-search" aria-hidden="true"></i> |
|||
</button> |
|||
<input type="text" class="form-control" name="" placeholder="Search..." disabled> |
|||
</div> |
|||
</div> |
|||
<h3 class="panel-title" data-lang="INDEX.ACTIVE_COINS"></h3> |
|||
</div> |
|||
</div> |
|||
<!-- End Search Panel --> |
|||
<!-- Wallet Widgets List --> |
|||
<div class="wallet-widgets-list" data-plugin="pageAsideScroll"> |
|||
<!--<div class="wallet-widgets-list">--> |
|||
<div data-role="container"> |
|||
<div data-role="content"> |
|||
<div class="list-group row wallet-widgets-row"> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End Wallet Widgets List --> |
|||
</div> |
|||
</div> |
|||
<!-- End Wallet Widgets Sidebar --> |
|||
`;
|
@ -1,359 +0,0 @@ |
|||
var WalletSettings = function() { |
|||
var handleWalletExportKeys = function() { |
|||
$('.wifkeys-form').validate({ |
|||
// errorElement: 'span', //default input error message container
|
|||
// errorClass: 'help-block', // default input error message class
|
|||
// focusInvalid: false, // do not focus the last invalid input
|
|||
rules: { |
|||
wifkeys_passphrase: { |
|||
required: true |
|||
} |
|||
}, |
|||
messages: { |
|||
wifkeys_passphrase: { |
|||
required: _lang[defaultLang].SETTINGS.PASSPHRASE_REQ |
|||
} |
|||
}, |
|||
submitHandler: function(form) { |
|||
console.log('wait till peer ip added to selected coin...'); |
|||
|
|||
var Getwifkeys_passphrase = $('#wifkeys_passphrase').val(), |
|||
WifKeyDivContent = ''; |
|||
|
|||
// First check which coins are active. Execute API for each mode of wallet
|
|||
$.each([ |
|||
'native', |
|||
'basilisk', |
|||
'full' |
|||
], function( index, value ) { |
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
allcoins_ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'InstantDEX', |
|||
'method': 'allcoins' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(allcoins_ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var AllcoinsDataOutput = JSON.parse(data); |
|||
// Only execute further code if that mode has any coins active it. if none, skill checking on them.
|
|||
if (AllcoinsDataOutput[value].length !== 0 ) { |
|||
console.log('== AllCoins Data OutPut =='); |
|||
console.log(value); |
|||
console.log(AllcoinsDataOutput[value]); |
|||
|
|||
// First Run Encryptwallet API to get wif keys for each active coin
|
|||
$.each(AllcoinsDataOutput[value], function(index) { |
|||
console.log(AllcoinsDataOutput[value][index]); |
|||
|
|||
var wifkey_coin_handle = AllcoinsDataOutput[value][index], |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
EncryptWallet_ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'encryptwallet', |
|||
'passphrase': Getwifkeys_passphrase |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(EncryptWallet_ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var EncryptWalletDataOutput = JSON.parse(data); |
|||
|
|||
console.log(EncryptWalletDataOutput[wifkey_coin_handle + 'wif']); |
|||
var WifKeyDivContent = '<table class="table">' + |
|||
'<tr>' + |
|||
'<td style="width: 5%">' + |
|||
'<b>' + wifkey_coin_handle + '</b>' + |
|||
'</td>' + |
|||
'<td>' + EncryptWalletDataOutput[wifkey_coin_handle] + '</td>' + |
|||
'</tr>' + |
|||
'<tr>' + |
|||
'<td>' + |
|||
'<b>' + wifkey_coin_handle + 'Wif</b>' + |
|||
'</td>' + |
|||
'<td>' + EncryptWalletDataOutput[wifkey_coin_handle + 'wif'] + '</td>' + |
|||
'</tr>' + |
|||
'</table>'; |
|||
$('#wif-priv-keys').html(WifKeyDivContent); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
//Second run walletpassphrase again to make sure wallet is unlocked as before login.
|
|||
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
WalletPassphrase_ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'bitcoinrpc', |
|||
'method': 'walletpassphrase', |
|||
'password': Getwifkeys_passphrase, |
|||
'timeout': '2592000' |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(WalletPassphrase_ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var WalletPassphraseDataOutput = JSON.parse(data); |
|||
console.log(WalletPassphraseDataOutput); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
$('.wifkeys-form input').keypress(function(e) { |
|||
if (e.which == 13) { |
|||
if ($('.wifkeys-form').validate().form()) { |
|||
$('.wifkeys-form').submit(); // form validation success, call ajax form submit
|
|||
} |
|||
|
|||
return false; |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
var handleWalletImportKeys = function() { |
|||
$('.wifkeys-import-form').validate({ |
|||
// errorElement: 'span', //default input error message container
|
|||
// errorClass: 'help-block', // default input error message class
|
|||
// focusInvalid: false, // do not focus the last invalid input
|
|||
rules: { |
|||
import_wifkey: { |
|||
required: true |
|||
} |
|||
}, |
|||
messages: { |
|||
import_wifkey: { |
|||
required: 'Private Key is required.' |
|||
} |
|||
}, |
|||
submitHandler: function(form) { |
|||
var Getimport_wifkey = $('#import_wifkey').val(); |
|||
EDEXimportprivkey(Getimport_wifkey) |
|||
.then(function(result) { |
|||
console.log(result); |
|||
if ( result.result !== undefined && result.result == 'success' ) { |
|||
toastr.success(_lang[defaultLang].TOASTR.PRIV_KEY_IMPORTED, _lang[defaultLang].TOASTR.SETTINGS_NOTIFICATION); |
|||
$('#import_wifkey').val(''); |
|||
} |
|||
if ( result.error !== undefined && result.error == 'null return from iguana_bitcoinRPC' ) { |
|||
toastr.info(_lang[defaultLang].TOASTR.PRIV_KEY_NOT_IMPORTED, _lang[defaultLang].TOASTR.SETTINGS_NOTIFICATION); |
|||
toastr.error(_lang[defaultLang].TOASTR.NULL_RETURN, _lang[defaultLang].TOASTR.SETTINGS_NOTIFICATION); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
$('.wifkeys-import-form input').keypress(function(e) { |
|||
if (e.which == 13) { |
|||
if ($('.wifkeys-import-form').validate().form()) { |
|||
$('.wifkeys-import-form').submit(); // form validation success, call ajax form submit
|
|||
} |
|||
|
|||
return false; |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
return { |
|||
// main function to initiate the module
|
|||
init: function() { |
|||
handleWalletExportKeys(); |
|||
handleWalletImportKeys(); |
|||
} |
|||
}; |
|||
}(); |
|||
|
|||
// DOM Ready =============================================================
|
|||
$(document).ready(function() { |
|||
WalletSettings.init(); |
|||
}); |
|||
|
|||
// Functions =============================================================
|
|||
function Settings_ShowWalletInfo() { |
|||
var CheckLoginData = JSON.parse(sessionStorage.getItem('IguanaActiveAccount')); |
|||
|
|||
console.log(JSON.parse(CheckLoginData)); |
|||
$('#winfo_pubkey_value').text(JSON.parse(CheckLoginData).pubkey); |
|||
$('#winfo_btcpubkey_value').text(JSON.parse(CheckLoginData).btcpubkey); |
|||
$('#winfo_rmd160_value').text(JSON.parse(CheckLoginData).rmd160); |
|||
$('#winfo_NXT_value').text(JSON.parse(CheckLoginData).NXT); |
|||
$('#winfo_notary_value').text(JSON.parse(CheckLoginData).notary); |
|||
$('#winfo_status_value').text(JSON.parse(CheckLoginData).status); |
|||
} |
|||
|
|||
function Settings_ShowCoinPeers() { |
|||
console.log('waiting getpeers api to complete...'); |
|||
$( |
|||
'#coin_supernetpeers_h,' + |
|||
'#coin_supernetpeers,' + |
|||
'#coin_rawpeers_h,' + |
|||
'#coin_rawpeers' |
|||
) |
|||
.text(''); |
|||
var settings_selected_coinname_code_val = $('option:selected', '#settings_select_coin_options').val(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'SuperNET', |
|||
'method': 'getpeers', |
|||
'activecoin': settings_selected_coinname_code_val |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var getCoinPeers = JSON.parse(data); |
|||
console.log(getCoinPeers); |
|||
|
|||
if (getCoinPeers.supernet[0].peers !== undefined ) { |
|||
var supernet_peers_list = getCoinPeers.supernet[0].peers; |
|||
|
|||
if (supernet_peers_list != 0 ) { |
|||
$('#coin_supernetpeers_h').text(getCoinPeers.supernet[0].coin); |
|||
$.each(supernet_peers_list, function( index, value ) { |
|||
var br_val = ''; |
|||
|
|||
if ( index != 0 ) { |
|||
br_val = '<br>'; |
|||
} |
|||
|
|||
$('#coin_supernetpeers').append(br_val + value); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
if (getCoinPeers.rawpeers[0].peers !== undefined ) { |
|||
var raw_peers_list = getCoinPeers.rawpeers[0].peers; |
|||
|
|||
if (raw_peers_list != 0 ) { |
|||
$('#coin_rawpeers_h').text(getCoinPeers.supernet[0].coin); |
|||
$.each(raw_peers_list, function( index, value ) { |
|||
var br_val = ''; |
|||
|
|||
if ( index != 0 ) { |
|||
br_val = '<br>'; |
|||
} |
|||
|
|||
$('#coin_rawpeers').append(br_val + value); |
|||
}); |
|||
} |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function Settings_AddCoinPeers() { |
|||
console.log('wait till peer ip added to selected coin...'); |
|||
var settings_selected_coinname_code_val = $('option:selected', '#settings_select_coin_addpeer_options').val(), |
|||
settings_add_peer_ip_val = $('#settings_add_peer_ip').val(), |
|||
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), |
|||
ajax_data = { |
|||
'userpass': tmpIguanaRPCAuth, |
|||
'agent': 'iguana', |
|||
'method': 'addnode', |
|||
'activecoin': settings_selected_coinname_code_val, |
|||
'ipaddr': settings_add_peer_ip_val |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: JSON.stringify(ajax_data), |
|||
url: 'http://127.0.0.1:' + config.iguanaPort, |
|||
success: function(data, textStatus, jqXHR) { |
|||
var getAddCoinPeers = JSON.parse(data); |
|||
|
|||
console.log(getAddCoinPeers); |
|||
if ( getAddCoinPeers.result == 'addnode submitted' ) { |
|||
toastr.success(settings_add_peer_ip_val + ' ' + _lang[defaultLang].TOASTR.ADDED_TO + ' ' + settings_selected_coinname_code_val + ' ' + _lang[defaultLang].TOASTR.SUCCESSFULLY, _lang[defaultLang].TOASTR.COIN_NOTIFICATION); |
|||
$('#settings_add_peer_ip').val(''); |
|||
} |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting Coin History.'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
function Settings_LoadDebugLog() { |
|||
var settings_selected_targed_val = $('option:selected', '#settings_select_debuglog_options').val(), |
|||
numLinesToRead = $('#read_debug_log_lines').val(), |
|||
ajax_data = { |
|||
'herdname': settings_selected_targed_val, |
|||
'lastLines': numLinesToRead |
|||
}; |
|||
|
|||
$.ajax({ |
|||
type: 'POST', |
|||
data: ajax_data, |
|||
url: 'http://127.0.0.1:17777/shepherd/debuglog', |
|||
success: function(data, textStatus, jqXHR) { |
|||
$('#read_debug_log_textarea').text(JSON.parse(data).result.replace('\n', '\r\n')); |
|||
console.log(data); |
|||
}, |
|||
error: function(xhr, textStatus, error) { |
|||
console.log('failed getting debug.log'); |
|||
console.log(xhr.statusText); |
|||
if ( xhr.readyState == 0 ) { |
|||
Iguana_ServiceUnavailable(); |
|||
} |
|||
console.log(textStatus); |
|||
console.log(error); |
|||
$('#read_debug_log_textarea').text(error); |
|||
} |
|||
}); |
|||
} |
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue