diff --git a/assets/pages/login.css b/assets/pages/login.css
index b8d60ad..12285e1 100755
--- a/assets/pages/login.css
+++ b/assets/pages/login.css
@@ -8,6 +8,14 @@
.page-login form a {
margin-left: 20px;
}
+.page-login .form-control,
+.page-login .floating-label,
+.page-login .form-control:focus + .floating-label {
+ color: #bdbdbd;
+}
+.page-login #addcoin_select_coin_mdl_options-login {
+ color: #757575;
+}
.page-login a {
color: #9fa8da;
}
@@ -19,15 +27,15 @@
#register-btn, #register-back-btn,
#logint-another-wallet {
- border: 1px solid #5d5d5d;
- color: #fff;
+ border: 1px solid #5d5d5d;
+ color: #fff;
}
#register-btn:hover,
#register-back-btn:hover,
#logint-another-wallet:hover {
- border: 1px solid #a7a7a7;
- color: #fff;
+ border: 1px solid #a7a7a7;
+ color: #fff;
}
.page-register:before {
diff --git a/assets/scripts/coinwallets.js b/assets/scripts/coinwallets.js
index 22f7121..68a14c5 100644
--- a/assets/scripts/coinwallets.js
+++ b/assets/scripts/coinwallets.js
@@ -32,12 +32,15 @@ function getCurrency() {
function sendCurrency(val) {
console.log(val);
- $('#mdl_currency_coin').text(val.currency);
$('#mdl_currency_balance').text($('span[data-currency="' + val.currency + '"][id="currency-balance"]').text());
//console.log($('span[data-currency="' + val.currency + '"][id="currency-balance"]').text());
- $('#mdl_currency_sendto').attr('placeholder', 'Enter ' + val.currency + ' address');
- $('#mdl_currency_amount_label').text(val.currency);
- $('#mdl_currency_total_coinname').text(val.currency);
+ $('#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 = {
@@ -121,7 +124,7 @@ $('#mdl_currency_amount').keyup(function() {
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())')
+ mdl_send_btn.attr('onclick', 'ConfirmsendCurrency($(this).data())');
} else {
mdl_send_btn.addClass('disabled');
mdl_send_btn.removeAttr('data-dismiss');
@@ -131,11 +134,11 @@ $('#mdl_currency_amount').keyup(function() {
});
$('#mdl_currency_fee').keyup(function() {
- var sum_val1 = parseFloat($('#mdl_currency_amount').val())
- var sum_val2 = parseFloat($('#mdl_currency_fee').val())
- var total_of_currency_fee = sum_val1 + sum_val2;
- var currency_fiat_value = '';
- var fiat_symbol = '';
+ 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');
@@ -152,15 +155,24 @@ $('#mdl_currency_fee').keyup(function() {
});
function CurrencyMdlBtnClean() {
- $('#mdl_currency_sendto').val('');
- $('#mdl_currency_amount').val('');
- $('#mdl_currency_total_value').text('0.00');
- $('#mdl_currency_total_fiat_value').text('0.00');
+ $(
+ '#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').text('');
- $('#mdl_receive_coin_addr_qr_code').text('');
+ $(
+ '#mdl_receive_coin_addr,' +
+ '#mdl_receive_coin_addr_qr_code'
+ )
+ .text('');
}
function ConfirmsendCurrency(confirm_val) {
@@ -182,14 +194,17 @@ function ConfirmsendCurrency(confirm_val) {
$('#mdl_confirm_currency_sendto_addr').text($('#mdl_currency_sendto').val());
$('#mdl_confirm_currency_send_amount').text($('#mdl_currency_amount').val());
- $('#mdl_confirm_currency_coinname').text(confirm_coinname);
+ $(
+ '#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_coinname_fee').text(confirm_coinname);
$('#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_coinname_total').text(confirm_coinname);
$('#mdl_confirm_currency_sendfrom_total_deduct_fiat').text($('#mdl_currency_total_fiat_value').text());
}
@@ -257,23 +272,29 @@ function ExecuteSendCurrencyAPI() {
});
// Clear Send Dialog values and set them to blank
- $('#mdl_currency_coin').text('');
- $('#mdl_currency_balance').text('');
- $('#mdl_currency_amount_label').text('');
- $('#mdl_currency_total_coinname').text('');
+ $(
+ '#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').text('');
- $('#mdl_confirm_currency_send_amount').text('');
- $('#mdl_confirm_currency_coinname').text('');
- $('#mdl_confirm_currency_send_amount_fiat').text('');
- $('#mdl_confirm_currency_send_fee').text('');
- $('#mdl_confirm_currency_coinname_fee').text('');
- $('#mdl_confirm_currency_send_fee_fiat').text('');
- $('#mdl_confirm_currency_sendfrom_addr').text('');
- $('#mdl_confirm_currency_sendfrom_total_dedcut').text('');
- $('#mdl_confirm_currency_coinname_total').text('');
- $('#mdl_confirm_currency_sendfrom_total_deduct_fiat').text('');
+ $(
+ '#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();
diff --git a/assets/scripts/dashboard.js b/assets/scripts/dashboard.js
index 9215acc..94b31b0 100644
--- a/assets/scripts/dashboard.js
+++ b/assets/scripts/dashboard.js
@@ -34,17 +34,28 @@ var Dashboard = function() {
$('#btn_edexcoin_dashboard').click(function() {
$('#btn_edexcoin_dashboard').hide();
- $('#btn_edexcoin_send').show();
- $('#btn_edexcoin_recieve').show();
+ $(
+ '#btn_edexcoin_send,' +
+ '#btn_edexcoin_recieve'
+ )
+ .show();
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
- $('#edexcoin_getbalance_interest').hide();
- $('#edexcoin_getbalance_total_interest').hide();
- $('#edexcoin_getbalance_t').removeClass( 'col-lg-4' ).addClass( 'col-lg-12' );
- $('#edex_interest_balance').text('-');
- $('#edex_total_balance_interest').text('-');
- $('#edex_total_balance').text('-');
+ $(
+ '#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(active_edexcoin);
if ( sessionStorage.getItem('edexTmpMode') === 'Full') {
@@ -53,59 +64,100 @@ var Dashboard = function() {
if ( /*sessionStorage.getItem('edexTmpMode') === 'Basilisk' ||*/ sessionStorage.getItem('edexTmpMode') === 'Native' ) {
sessionStorage.setItem('edexTmpRefresh', 'stop');
}
- $('#edexcoin_dashoard_section').show();
- $('#edexcoin_dashboardinfo').show();
- $('#edexcoin_send').hide();
- $('#edexcoin_recieve').hide();
- $('#edexcoin_recieve_section').hide();
- $('#edexcoin_settings').hide();
+ $(
+ '#edexcoin_dashoard_section,' +
+ '#edexcoin_dashboardinfo'
+ )
+ .show();
+ $(
+ '#edexcoin_send,' +
+ '#edexcoin_recieve,' +
+ '#edexcoin_recieve_section,' +
+ '#edexcoin_settings'
+ )
+ .hide();
var selected_coinmode = sessionStorage.getItem('edexTmpMode');
if ( selected_coinmode == 'Basilisk' ) {
- getDEXGetBalance_cache(active_edexcoin).then(function(result) {
+ getDEXGetBalance_cache(active_edexcoin)
+ .then(function(result) {
//console.log(result)
if ( result.interest !== undefined && active_edexcoin == 'KMD') {
- $('#edexcoin_getbalance_interest').show();
- $('#edexcoin_getbalance_total_interest').show();
- $('#edexcoin_getbalance_t').removeClass( 'col-lg-12' ).addClass( 'col-lg-4' );
+ $(
+ '#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(active_edexcoin);
- $('#edex_total_balance_interest_coincode').text(active_edexcoin);
+ $(
+ '#edex_total_interest_coincode,' +
+ '#edex_total_balance_interest_coincode'
+ )
+ .text(active_edexcoin);
}
if ( result.interest === undefined ) {
- $('#edexcoin_getbalance_interest').hide();
- $('#edexcoin_getbalance_total_interest').hide();
- $('#edexcoin_getbalance_t').removeClass( 'col-lg-4' ).addClass( 'col-lg-12' );
- $('#edex_interest_balance').text('-');
- $('#edex_total_balance_interest').text('-');
+ $(
+ '#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(active_edexcoin);
});
} else {
- EDEXlistunspent(active_edexcoin).then(function(result) {
+ EDEXlistunspent(active_edexcoin)
+ .then(function(result) {
//console.log(result)
if (result[0] != undefined) {
//console.log(result[0])
if ( result[0].interest !== undefined ) {
- $('#edexcoin_getbalance_interest').show();
- $('#edexcoin_getbalance_total_interest').show();
- $('#edexcoin_getbalance_t').removeClass( 'col-lg-12' ).addClass( 'col-lg-4' );
+ $(
+ '#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);
+ $(
+ '#edex_total_interest_coincode,' +
+ '#edex_total_balance_interest_coincode'
+ )
+ .text(active_edexcoin);
}
if ( result[0].interest === undefined ) {
- $('#edexcoin_getbalance_interest').hide();
- $('#edexcoin_getbalance_total_interest').hide();
- $('#edexcoin_getbalance_t').removeClass( 'col-lg-4' ).addClass( 'col-lg-12' );
- $('#edex_interest_balance').text('-');
- $('#edex_total_balance_interest').text('-');
+ $(
+ '#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);
@@ -123,59 +175,76 @@ var Dashboard = function() {
var handle_edex_send = function() {
$('.btn_refresh_edexcoin_send').click(function() {
- var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
- 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('Refreshing Wallet Funds.', 'Wallet Notification');
+ var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'),
+ 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);
})
});
$('#btn_edexcoin_send').click(function() {
- $('#btn_edexcoin_dashboard').show();
+ $(
+ '#btn_edexcoin_dashboard,' +
+ '#btn_edexcoin_recieve'
+ )
+ .show();
$('#btn_edexcoin_send').hide();
- $('#btn_edexcoin_recieve').show();
- $('#edexcoin_dashboardinfo').hide();
$('#edexcoin_send').show();
- $('#edexcoin_recieve').hide();
- $('#edexcoin_recieve_section').hide();
- $('#edexcoin_settings').hide();
+ $(
+ '#edexcoin_dashboardinfo,' +
+ '#edexcoin_recieve,' +
+ '#edexcoin_recieve_section,' +
+ '#edexcoin_settings'
+ )
+ .hide();
sessionStorage.setItem('edexTmpRefresh', 'stop');
- var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
- var selected_coinmode = sessionStorage.getItem('edexTmpMode')
+ var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'),
+ selected_coinmode = sessionStorage.getItem('edexTmpMode')
// This send from part is only enabled now for Basilisk coins except BTC and SYS.
if (selected_coinmode == 'Basilisk' && active_edexcoin !== 'BTC' && active_edexcoin !== 'SYS' ) {
- $('.edexcoin_send_from_for_basilisk').show()
- EDEXgetaddrbyaccount_cache(active_edexcoin).then(function(result){
- //console.log(result)
- edexcoin_addr_list_with_balance = result
- console.log(edexcoin_addr_list_with_balance);
+ $('.edexcoin_send_from_for_basilisk').show();
+ EDEXgetaddrbyaccount_cache(active_edexcoin)
+ .then(function(result){
var tmpoptions = '';
- tmpoptions += '';
+ //console.log(result);
+ edexcoin_addr_list_with_balance = result;
+ console.log(edexcoin_addr_list_with_balance);
+ tmpoptions += '';
$.each(edexcoin_addr_list_with_balance, function(index) {
tmpoptions += '';
$('#edexcoin_send_from').html(tmpoptions);
});
- $('.showedexcoinaddrs').selectpicker({ style: 'btn-info' });
- $('.showedexcoinaddrs').selectpicker('refresh');
+ $('.showedexcoinaddrs')
+ .selectpicker({ style: 'btn-info' })
+ .selectpicker('refresh');
- $('.edexcoin_send_coins_btn_step1').addClass('disabled');
- $('.edexcoin_send_coins_btn_step1').attr('disabled','disabled');
+ $('.edexcoin_send_coins_btn_step1')
+ .addClass('disabled')
+ .attr('disabled','disabled');
})
} else {
- $('.edexcoin_send_from_for_basilisk').hide()
- $('.edexcoin_send_coins_btn_step1').removeClass('disabled');
- $('.edexcoin_send_coins_btn_step1').removeAttr('disabled');
+ $('.edexcoin_send_from_for_basilisk').hide();
+ $('.edexcoin_send_coins_btn_step1')
+ .removeClass('disabled')
+ .removeAttr('disabled');
}
//clearEdexSendFieldData();
$('.edexcoin-send-form')[0].reset();
if ( selected_coinmode == 'Full' ) {
- EDEXgetinfo(active_edexcoin).then(function(result) {
+ EDEXgetinfo(active_edexcoin)
+ .then(function(result) {
$('#edexcoin_fee').val(result.kbfee);
});
}
@@ -188,24 +257,27 @@ var Dashboard = function() {
$('#edexcoin_send_from').change(function() {
if ($('#edexcoin_send_from').val() !== '' || $('#edexcoin_send_from').val() !== _lang[defaultLang].DASHBOARD.SELECT_ADDRESS) {
- $('.edexcoin_send_coins_btn_step1').removeClass('disabled');
- $('.edexcoin_send_coins_btn_step1').prop('disabled', false);
+ $('.edexcoin_send_coins_btn_step1')
+ .removeClass('disabled')
+ .prop('disabled', false);
- Shepherd_GetBasiliskCache().then(function(result){
+ Shepherd_GetBasiliskCache()
+ .then(function(result) {
var _data = JSON.parse(result),
query = _data.result.basilisk,
active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'),
coin_addr = $('#edexcoin_send_from').val();
if (!('refresh' in query[active_edexcoin][coin_addr])) {
- console.log(active_edexcoin + '>>>' + coin_addr + ' => refresh not found.')
+ console.log(active_edexcoin + '>>>' + coin_addr + ' => refresh not found.');
var call_data = {
- 'allcoins': false,
- 'coin': active_edexcoin,
- 'calls': 'refresh'
- };
- Shepherd_FetchBasiliskData(call_data).then(function(result) {
+ 'allcoins': false,
+ 'coin': active_edexcoin,
+ 'calls': 'refresh'
+ };
+ Shepherd_FetchBasiliskData(call_data)
+ .then(function(result) {
console.log(result);
});
} else {
@@ -214,8 +286,9 @@ var Dashboard = function() {
})
}
if ($('#edexcoin_send_from').val() === '' || $('#edexcoin_send_from').val() === _lang[defaultLang].DASHBOARD.SELECT_ADDRESS) {
- $('.edexcoin_send_coins_btn_step1').addClass(' disabled');
- $('.edexcoin_send_coins_btn_step1').prop('disabled', true);
+ $('.edexcoin_send_coins_btn_step1')
+ .addClass(' disabled')
+ .prop('disabled', true);
}
})
@@ -288,15 +361,16 @@ var Dashboard = function() {
});
NProgress.start();
- var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
- var selected_coinmode = sessionStorage.getItem('edexTmpMode')
+ var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'),
+ selected_coinmode = sessionStorage.getItem('edexTmpMode');
console.log('Sent control here after clicked in form...');
if (selected_coinmode == 'Basilisk' && active_edexcoin !== 'BTC' && active_edexcoin !== 'SYS' ) {
$('#mdl_confirm_currency_sendfrom_addr').text($('#edexcoin_send_from').val());
} else {
- EDEXMainAddr($('[data-edexcoin]').attr('data-edexcoin')).then(function(result) {
+ EDEXMainAddr($('[data-edexcoin]').attr('data-edexcoin'))
+ .then(function(result) {
$('#mdl_confirm_currency_sendfrom_addr').text(result);
});
}
@@ -322,9 +396,15 @@ var Dashboard = function() {
$('#edexcoin-send-screen').hide();
$('#edexcoin-send-confirm-screen').show();
- $('#edexcoin_send_step_1').removeClass( 'current' ).addClass( '' );
- $('#edexcoin_send_step_2').removeClass( '' ).addClass( 'current' );
- $('#edexcoin_send_step_3').removeClass( 'current' ).addClass( '' );
+ $(
+ '#edexcoin_send_step_1,' +
+ '#edexcoin_send_step_3'
+ )
+ .removeClass( 'current' )
+ .addClass( '' );
+ $('#edexcoin_send_step_2')
+ .removeClass( '' )
+ .addClass( 'current' );
NProgress.done();
}
@@ -334,11 +414,11 @@ var Dashboard = function() {
//$('#edexcoin_send_coins_btn').prop('disabled', true);
console.log('==> After confirming tx to send')
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'),
- tmp_send_from_addr = $('#edexcoin_send_from').val()
+ tmp_send_from_addr = $('#edexcoin_send_from').val(),
tmp_send_to_addr = $('#edexcoin_sendto').val(),
tmp_send_total_amount = $('#edexcoin_total_value').text(),
tmp_send_fee = $('#edexcoin_fee').val(),
- tmp_sendflag = $('#edexcoin_send_sig').is(":checked");
+ tmp_sendflag = $('#edexcoin_send_sig').is(':checked');
console.log(active_edexcoin);
console.log(tmp_send_from_addr);
@@ -355,51 +435,68 @@ var Dashboard = function() {
$('#edexcoin_sendto_result tbody').html(edexcoin_sendto_result_tbl);
$('#edexcoin_send_coins_anothertx_btn').hide();
- var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
- var selected_coinmode = sessionStorage.getItem('edexTmpMode')
+ var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'),
+ selected_coinmode = sessionStorage.getItem('edexTmpMode');
if (selected_coinmode == 'Basilisk' && active_edexcoin !== 'BTC' && active_edexcoin !== 'SYS' ) {
var tmp_json_data = {
- 'coin': active_edexcoin,
- 'sendfrom': tmp_send_from_addr,
- 'sendtoaddr': tmp_send_to_addr,
- 'amount': tmp_send_total_amount,
- 'txfee': tmp_send_fee,
- 'sendsig': tmp_sendflag
- };
+ 'coin': active_edexcoin,
+ 'sendfrom': tmp_send_from_addr,
+ 'sendtoaddr': tmp_send_to_addr,
+ 'amount': tmp_send_total_amount,
+ 'txfee': tmp_send_fee,
+ 'sendsig': tmp_sendflag
+ };
console.log(tmp_json_data);
- EDEXSendutxoRawTx(tmp_json_data)
+ EDEXSendutxoRawTx(tmp_json_data);
} else {
var tmp_json_data = {
- 'coin': active_edexcoin,
- 'sendtoaddr': tmp_send_to_addr,
- 'amount': tmp_send_total_amount
- };
+ 'coin': active_edexcoin,
+ 'sendtoaddr': tmp_send_to_addr,
+ 'amount': tmp_send_total_amount
+ };
console.log(tmp_json_data);
EDEXSendToAddr(tmp_json_data);
}
$('.edexcoin-send-form')[0].reset();
$('#edexcoin_total_value').text('0.000');
$('#edexcoin-send-confirm-screen').hide();
- $('#edexcoin-send-txdetails-screen').show();
- $('#edexcoin-send-txdetails-screen').data('panel-api').load();
+ $('#edexcoin-send-txdetails-screen')
+ .show()
+ .data('panel-api')
+ .load();
edexcoin_send_form_validator.resetForm();
- $('#edexcoin_send_step_1').removeClass( 'current' ).addClass( '' );
- $('#edexcoin_send_step_2').removeClass( 'current' ).addClass( '' );
- $('#edexcoin_send_step_3').removeClass( '' ).addClass( 'current' );
+ $(
+ '#edexcoin_send_step_1,' +
+ '#edexcoin_send_step_2'
+ )
+ .removeClass( 'current' )
+ .addClass( '' );
+ $('#edexcoin_send_step_3')
+ .removeClass( '' )
+ .addClass( 'current' );
});
$('#edexcoin_send_coins_back_btn').click(function() {
- $('#edexcoin-send-confirm-screen').hide();
- $('#edexcoin-send-txdetails-screen').hide();
+ $(
+ '#edexcoin-send-confirm-screen,' +
+ '#edexcoin-send-txdetails-screen'
+ )
+ .hide();
$('#edexcoin-send-screen').show();
var active_edexcoin = '',
tmp_send_to_addr = '',
tmp_send_total_amount = '';
edexcoin_send_form_validator.resetForm();
- $('#edexcoin_send_step_1').removeClass( '' ).addClass( 'current' );
- $('#edexcoin_send_step_2').removeClass( 'current' ).addClass( '' );
- $('#edexcoin_send_step_3').removeClass( 'current' ).addClass( '' );
+ $('#edexcoin_send_step_1')
+ .removeClass( '' )
+ .addClass( 'current' );
+ $(
+ '#edexcoin_send_step_2,' +
+ '#edexcoin_send_step_3'
+ )
+ .removeClass( 'current' )
+ .addClass( '' );
});
$('#edexcoin_send_coins_anothertx_btn').click(function() {
@@ -429,17 +526,26 @@ var Dashboard = function() {
var handle_edex_recieve = function() {
$('#btn_edexcoin_recieve').click(function() {
- $('#btn_edexcoin_dashboard').show();
- $('#btn_edexcoin_send').show();
+ $(
+ '#btn_edexcoin_dashboard,' +
+ '#btn_edexcoin_send'
+ )
+ .show();
$('#btn_edexcoin_recieve').hide();
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
sessionStorage.setItem('edexTmpRefresh', 'stop');
- $('#edexcoin_dashboardinfo').hide();
- $('#edexcoin_dashoard_section').hide();
- $('#edexcoin_send').hide();
- $('#edexcoin_recieve').show();
- $('#edexcoin_recieve_section').show();
- $('#edexcoin_settings').hide();
+ $(
+ '#edexcoin_dashboardinfo,' +
+ '#edexcoin_dashoard_section,' +
+ '#edexcoin_send,' +
+ '#edexcoin_settings'
+ )
+ .hide();
+ $(
+ '#edexcoin_recieve,' +
+ '#edexcoin_recieve_section'
+ )
+ .show();
EdexListAllAddr(active_edexcoin);
$('.edexcoin-send-form')[0].reset();
});
@@ -460,13 +566,13 @@ var Dashboard = function() {
'native',
'basilisk',
'full'
- ], function( index, value ) {
- var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
- ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': 'InstantDEX',
- 'method': 'allcoins'
- };
+ ], function( index, value ) {
+ var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
+ ajax_data = {
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': 'InstantDEX',
+ 'method': 'allcoins'
+ };
$.ajax({
type: 'POST',
@@ -510,309 +616,310 @@ var Dashboard = function() {
}
switch (AllcoinsDataOutput[value][index]) {
- case 'BTC':
- coinlogo = 'bitcoin';
- coinname = 'Bitcoin';
- break;
- case 'BTCD':
- coinlogo = 'bitcoindark';
- coinname = 'BitcoinDark';
- break;
- case 'LTC':
- coinlogo = 'litecoin';
- coinname = 'Litecoin';
- break;
- case 'VPN':
- coinlogo = 'vpncoin';
- coinname = 'VPNcoin';
- break;
- case 'SYS':
- coinlogo = 'syscoin';
- coinname = 'Syscoin';
- break;
- case 'ZEC':
- coinlogo = 'zcash';
- coinname = 'Zcash';
- break;
- case 'NMC':
- coinlogo = 'namecoin';
- coinname = 'Namecoin';
- break;
- case 'DEX':
- coinlogo = 'dex';
- coinname = 'InstantDEX';
- break;
- case 'DOGE':
- coinlogo = 'dogecoin';
- coinname = 'Dogecoin';
- break;
- case 'DGB':
- coinlogo = 'digibyte';
- coinname = 'Digibyte';
- break;
- case 'MZC':
- coinlogo = 'mazacoin';
- coinname = 'Mazacoin';
- break;
- case 'UNO':
- coinlogo = 'unobtanium';
- coinname = 'Unobtanium';
- break;
- case 'ZET':
- coinlogo = 'zetacoin';
- coinname = 'Zetacoin';
- break;
- case 'KMD':
- coinlogo = 'komodo';
- coinname = 'Komodo';
- break;
- case 'BTM':
- coinlogo = 'bitmark';
- coinname = 'Bitmark';
- break;
- case 'CARB':
- coinlogo = 'carboncoin';
- coinname = 'Carboncoin';
- break;
- case 'ANC':
- coinlogo = 'anoncoin';
- coinname = 'AnonCoin';
- break;
- case 'FRK':
- coinlogo = 'franko';
- coinname = 'Franko';
- break;
- case 'SUPERNET':
- coinlogo = 'SUPERNET';
- coinname = 'SUPERNET';
- break;
- case 'REVS':
- coinlogo = 'REVS';
- coinname = 'REVS';
- break;
- case 'WIRELESS':
- coinlogo = 'WIRELESS';
- coinname = 'WIRELESS';
- break;
- case 'PANGEA':
- coinlogo = 'PANGEA';
- coinname = 'PANGEA';
- break;
- case 'JUMBLR':
- coinlogo = 'JUMBLR';
- coinname = 'JUMBLR';
- break;
- case 'BET':
- coinlogo = 'BET';
- coinname = 'BET';
- break;
- case 'CRYPTO':
- coinlogo = 'CRYPTO';
- coinname = 'CRYPTO';
- break;
- case 'HODL':
- coinlogo = 'HODL';
- coinname = 'HODL';
- break;
- case 'SHARK':
- coinlogo = 'SHARK';
- coinname = 'SHARK';
- break;
- case 'BOTS':
- coinlogo = 'BOTS';
- coinname = 'BOTS';
- break;
- case 'MGW':
- coinlogo = 'MGW';
- coinname = 'MultiGateway';
- break;
- case 'MVP':
- coinlogo = 'MVP';
- coinname = 'MVP Lineup';
- break;
- case 'KV':
- coinlogo = 'KV';
- coinname = 'KV';
- break;
- case 'CEAL':
- coinlogo = 'CEAL';
- coinname = 'CEAL NET';
- break;
- case 'MESH':
- coinlogo = 'MESH';
- coinname = 'SpaceMesh';
- break;
- case 'USD':
- coinlogo = 'USD';
- coinname = 'US Dollar';
- break;
- case 'RON':
- coinlogo = 'RON';
- coinname = 'Romanian Leu';
- break;
- case 'EUR':
- coinlogo = 'EUR';
- coinname = 'Euro';
- break;
- case 'JPY':
- coinlogo = 'JPY';
- coinname = 'Japanese Yen';
- break;
- case 'GBP':
- coinlogo = 'GBP';
- coinname = 'British Pound';
- break;
- case 'AUD':
- coinlogo = 'AUD';
- coinname = 'Australian Dollar';
- break;
- case 'CAD':
- coinlogo = 'CAD';
- coinname = 'Canadian Dollar';
- break;
- case 'CHF':
- coinlogo = 'CHF';
- coinname = 'Swiss Franc';
- break;
- case 'NZD':
- coinlogo = 'NZD';
- coinname = 'New Zealand Dollar';
- break;
- case 'CNY':
- coinlogo = 'CNY';
- coinname = 'Chinese Yuan';
- break;
- case 'RUB':
- coinlogo = 'RUB';
- coinname = 'Russian Ruble';
- break;
- case 'MXN':
- coinlogo = 'MXN';
- coinname = 'Mexican peso';
- break;
- case 'BRL':
- coinlogo = 'BRL';
- coinname = 'Brazilian Real';
- break;
- case 'INR':
- coinlogo = 'INR';
- coinname = 'Indian Rupee';
- break;
- case 'HKD':
- coinlogo = 'HKD';
- coinname = 'Hong Kong Dollar';
- break;
- case 'TRY':
- coinlogo = 'TRY';
- coinname = 'Turkish Lira';
- break;
- case 'ZAR':
- coinlogo = 'ZAR';
- coinname = 'South African Rand';
- break;
- case 'PLN':
- coinlogo = 'PLN';
- coinname = 'Polish Zloty';
- break;
- case 'NOK':
- coinlogo = 'NOK';
- coinname = 'Norwegian Krone';
- break;
- case 'SEK':
- coinlogo = 'SEK';
- coinname = 'Swedish Krona';
- break;
- case 'DKK':
- coinlogo = 'DKK';
- coinname = 'Danish Krone';
- break;
- case 'CZK':
- coinlogo = 'CZK';
- coinname = 'Czech Koruna';
- break;
- case 'HUF':
- coinlogo = 'HUF';
- coinname = 'Hungarian Forint';
- break;
- case 'ILS':
- coinlogo = 'ILS';
- coinname = 'Israeli Shekel';
- break;
- case 'KRW':
- coinlogo = 'KRW';
- coinname = 'Korean Won';
- break;
- case 'MYR':
- coinlogo = 'MYR';
- coinname = 'Malaysian Ringgit';
- break;
- case 'PHP':
- coinlogo = 'PHP';
- coinname = 'Philippine Peso';
- break;
- case 'SGD':
- coinlogo = 'SGD';
- coinname = 'Singapore Dollar';
- break;
- case 'THB':
- coinlogo = 'THB';
- coinname = 'Thai Baht';
- break;
- case 'BGN':
- coinlogo = 'BGN';
- coinname = 'Bulgarian Lev';
- break;
- case 'IDR':
- coinlogo = 'IDR';
- coinname = 'Indonesian Rupiah';
- break;
- case 'HRK':
- coinlogo = 'HRK';
- coinname = 'Croatian Kuna';
- break;
+ case 'BTC':
+ coinlogo = 'bitcoin';
+ coinname = 'Bitcoin';
+ break;
+ case 'BTCD':
+ coinlogo = 'bitcoindark';
+ coinname = 'BitcoinDark';
+ break;
+ case 'LTC':
+ coinlogo = 'litecoin';
+ coinname = 'Litecoin';
+ break;
+ case 'VPN':
+ coinlogo = 'vpncoin';
+ coinname = 'VPNcoin';
+ break;
+ case 'SYS':
+ coinlogo = 'syscoin';
+ coinname = 'Syscoin';
+ break;
+ case 'ZEC':
+ coinlogo = 'zcash';
+ coinname = 'Zcash';
+ break;
+ case 'NMC':
+ coinlogo = 'namecoin';
+ coinname = 'Namecoin';
+ break;
+ case 'DEX':
+ coinlogo = 'dex';
+ coinname = 'InstantDEX';
+ break;
+ case 'DOGE':
+ coinlogo = 'dogecoin';
+ coinname = 'Dogecoin';
+ break;
+ case 'DGB':
+ coinlogo = 'digibyte';
+ coinname = 'Digibyte';
+ break;
+ case 'MZC':
+ coinlogo = 'mazacoin';
+ coinname = 'Mazacoin';
+ break;
+ case 'UNO':
+ coinlogo = 'unobtanium';
+ coinname = 'Unobtanium';
+ break;
+ case 'ZET':
+ coinlogo = 'zetacoin';
+ coinname = 'Zetacoin';
+ break;
+ case 'KMD':
+ coinlogo = 'komodo';
+ coinname = 'Komodo';
+ break;
+ case 'BTM':
+ coinlogo = 'bitmark';
+ coinname = 'Bitmark';
+ break;
+ case 'CARB':
+ coinlogo = 'carboncoin';
+ coinname = 'Carboncoin';
+ break;
+ case 'ANC':
+ coinlogo = 'anoncoin';
+ coinname = 'AnonCoin';
+ break;
+ case 'FRK':
+ coinlogo = 'franko';
+ coinname = 'Franko';
+ break;
+ case 'SUPERNET':
+ coinlogo = 'SUPERNET';
+ coinname = 'SUPERNET';
+ break;
+ case 'REVS':
+ coinlogo = 'REVS';
+ coinname = 'REVS';
+ break;
+ case 'WIRELESS':
+ coinlogo = 'WIRELESS';
+ coinname = 'WIRELESS';
+ break;
+ case 'PANGEA':
+ coinlogo = 'PANGEA';
+ coinname = 'PANGEA';
+ break;
+ case 'JUMBLR':
+ coinlogo = 'JUMBLR';
+ coinname = 'JUMBLR';
+ break;
+ case 'BET':
+ coinlogo = 'BET';
+ coinname = 'BET';
+ break;
+ case 'CRYPTO':
+ coinlogo = 'CRYPTO';
+ coinname = 'CRYPTO';
+ break;
+ case 'HODL':
+ coinlogo = 'HODL';
+ coinname = 'HODL';
+ break;
+ case 'SHARK':
+ coinlogo = 'SHARK';
+ coinname = 'SHARK';
+ break;
+ case 'BOTS':
+ coinlogo = 'BOTS';
+ coinname = 'BOTS';
+ break;
+ case 'MGW':
+ coinlogo = 'MGW';
+ coinname = 'MultiGateway';
+ break;
+ case 'MVP':
+ coinlogo = 'MVP';
+ coinname = 'MVP Lineup';
+ break;
+ case 'KV':
+ coinlogo = 'KV';
+ coinname = 'KV';
+ break;
+ case 'CEAL':
+ coinlogo = 'CEAL';
+ coinname = 'CEAL NET';
+ break;
+ case 'MESH':
+ coinlogo = 'MESH';
+ coinname = 'SpaceMesh';
+ break;
+ case 'USD':
+ coinlogo = 'USD';
+ coinname = 'US Dollar';
+ break;
+ case 'RON':
+ coinlogo = 'RON';
+ coinname = 'Romanian Leu';
+ break;
+ case 'EUR':
+ coinlogo = 'EUR';
+ coinname = 'Euro';
+ break;
+ case 'JPY':
+ coinlogo = 'JPY';
+ coinname = 'Japanese Yen';
+ break;
+ case 'GBP':
+ coinlogo = 'GBP';
+ coinname = 'British Pound';
+ break;
+ case 'AUD':
+ coinlogo = 'AUD';
+ coinname = 'Australian Dollar';
+ break;
+ case 'CAD':
+ coinlogo = 'CAD';
+ coinname = 'Canadian Dollar';
+ break;
+ case 'CHF':
+ coinlogo = 'CHF';
+ coinname = 'Swiss Franc';
+ break;
+ case 'NZD':
+ coinlogo = 'NZD';
+ coinname = 'New Zealand Dollar';
+ break;
+ case 'CNY':
+ coinlogo = 'CNY';
+ coinname = 'Chinese Yuan';
+ break;
+ case 'RUB':
+ coinlogo = 'RUB';
+ coinname = 'Russian Ruble';
+ break;
+ case 'MXN':
+ coinlogo = 'MXN';
+ coinname = 'Mexican peso';
+ break;
+ case 'BRL':
+ coinlogo = 'BRL';
+ coinname = 'Brazilian Real';
+ break;
+ case 'INR':
+ coinlogo = 'INR';
+ coinname = 'Indian Rupee';
+ break;
+ case 'HKD':
+ coinlogo = 'HKD';
+ coinname = 'Hong Kong Dollar';
+ break;
+ case 'TRY':
+ coinlogo = 'TRY';
+ coinname = 'Turkish Lira';
+ break;
+ case 'ZAR':
+ coinlogo = 'ZAR';
+ coinname = 'South African Rand';
+ break;
+ case 'PLN':
+ coinlogo = 'PLN';
+ coinname = 'Polish Zloty';
+ break;
+ case 'NOK':
+ coinlogo = 'NOK';
+ coinname = 'Norwegian Krone';
+ break;
+ case 'SEK':
+ coinlogo = 'SEK';
+ coinname = 'Swedish Krona';
+ break;
+ case 'DKK':
+ coinlogo = 'DKK';
+ coinname = 'Danish Krone';
+ break;
+ case 'CZK':
+ coinlogo = 'CZK';
+ coinname = 'Czech Koruna';
+ break;
+ case 'HUF':
+ coinlogo = 'HUF';
+ coinname = 'Hungarian Forint';
+ break;
+ case 'ILS':
+ coinlogo = 'ILS';
+ coinname = 'Israeli Shekel';
+ break;
+ case 'KRW':
+ coinlogo = 'KRW';
+ coinname = 'Korean Won';
+ break;
+ case 'MYR':
+ coinlogo = 'MYR';
+ coinname = 'Malaysian Ringgit';
+ break;
+ case 'PHP':
+ coinlogo = 'PHP';
+ coinname = 'Philippine Peso';
+ break;
+ case 'SGD':
+ coinlogo = 'SGD';
+ coinname = 'Singapore Dollar';
+ break;
+ case 'THB':
+ coinlogo = 'THB';
+ coinname = 'Thai Baht';
+ break;
+ case 'BGN':
+ coinlogo = 'BGN';
+ coinname = 'Bulgarian Lev';
+ break;
+ case 'IDR':
+ coinlogo = 'IDR';
+ coinname = 'Indonesian Rupiah';
+ break;
+ case 'HRK':
+ coinlogo = 'HRK';
+ coinname = 'Croatian Kuna';
+ break;
}
- walletDivContent += '';
- walletDivContent += '
' +
'signedtx | ' +
'' +
'' + SendToAddrData.signedtx + '' +
@@ -518,7 +538,9 @@ function EDEXSendToAddr(data) {
var selected_coinmode = sessionStorage.getItem('edexTmpMode');
if ( selected_coinmode == 'Basilisk' ) {
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
- getDEXGetBalance(active_edexcoin).then(function(result) {
+
+ getDEXGetBalance(active_edexcoin)
+ .then(function(result) {
$('#edex_total_balance').text(result.total);
});
} else {
@@ -562,7 +584,8 @@ function EDEXgetinfo(coin) {
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) {
+ })
+ .fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
@@ -570,7 +593,7 @@ function EDEXgetinfo(coin) {
console.log(textStatus);
console.log(error);
});
- })
+ });
}
function EDEXgettransaction(coin,txid) {
@@ -581,7 +604,7 @@ function EDEXgettransaction(coin,txid) {
'symbol': coin,
'agent': 'dex',
'method': 'gettransaction',
- 'vout':1,
+ 'vout': 1,
'txid': txid
};
@@ -590,12 +613,14 @@ function EDEXgettransaction(coin,txid) {
type: 'POST',
data: JSON.stringify(ajax_data),
url: 'http://127.0.0.1:' + config.iguanaPort
- }).then(function(data) {
+ })
+ .then(function(data) {
//console.log(data);
res_data = JSON.parse(data);
//console.log(res_data);
resolve(res_data);
- }).fail(function(xhr, textStatus, error) {
+ })
+ .fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
@@ -620,7 +645,8 @@ function EDEXgettransaction(coin,txid) {
function EDEXgetaddrbyaccount_cache(coin) {
return new Promise((resolve) => {
- Shepherd_GetBasiliskCache().then(function(result) {
+ Shepherd_GetBasiliskCache()
+ .then(function(result) {
var _data = JSON.parse(result),
query = _data.result.basilisk,
tmp_addr_label = '' +
@@ -637,12 +663,12 @@ function EDEXgetaddrbyaccount_cache(coin) {
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)
- };
+ 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 = {
@@ -713,7 +739,8 @@ function EDEXgetaddrbyaccount(coin) {
url: 'http://127.0.0.1:' + config.iguanaPort,
type: 'POST',
dataType: 'json'
- }).then(data => {
+ })
+ .then(data => {
if (data.interest !== undefined) {
var pass_data = {
'label': tmp_addr_label,
@@ -734,7 +761,8 @@ function EDEXgetaddrbyaccount(coin) {
});
});
- })).then(result => {
+ }))
+ .then(result => {
resolve(result);
NProgress.done();
});
@@ -748,7 +776,7 @@ function EDEXgetaddrbyaccount(coin) {
'symbol': coin
};
- console.log(params)
+ console.log(params);
return new Promise((resolve, reject) => {
$.ajax({
data: JSON.stringify(params),
@@ -776,7 +804,7 @@ function EDEXgetaddrbyaccount(coin) {
};
console.log(tmp_addr_total_balance_output);
- if (data == '' ) {
+ if (data == '') {
tmp_addr_total_balance_output = {
'label': tmp_addr_label,
'addr': coinaddr_value,
@@ -787,8 +815,8 @@ function EDEXgetaddrbyaccount(coin) {
resolve(tmp_addr_total_balance_output);
});
});
-
- })).then(result => {
+ }))
+ .then(result => {
resolve(result);
NProgress.done();
});
@@ -810,7 +838,8 @@ function EDEXgetaddrbyaccount(coin) {
coin !== 'FRK' ) {
Promise.all(data.result.map((coinaddr_value, coinaddr_index) => {
return new Promise((resolve, reject) => {
- EDEXlistunspent(coin, coinaddr_value).then(function(data) {
+ EDEXlistunspent(coin, coinaddr_value)
+ .then(function(data) {
var pass_data;
console.log(data);
@@ -842,20 +871,22 @@ function EDEXgetaddrbyaccount(coin) {
resolve(pass_data);
});
});
- })).then(result => {
+ }))
+ .then(result => {
console.log(result);
resolve(result);
NProgress.done();
});
}
- }).fail(function(xhr, textStatus, error) {
+ })
+ .fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
}
console.log(textStatus);
console.log(error);
- })
+ });
});
}
@@ -872,7 +903,8 @@ function EDEXgetnewaddress(coin) {
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) {
+ })
+ .fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
@@ -897,7 +929,8 @@ function EDEXimportprivkey(params_data) {
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) {
+ })
+ .fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
@@ -905,20 +938,20 @@ function EDEXimportprivkey(params_data) {
console.log(textStatus);
console.log(error);
});
- })
+ });
}
-function EDEX_ProcessRefreshData(gettxdata,refreshdata){
+function EDEX_ProcessRefreshData(gettxdata, refreshdata){
//console.log(gettxdata);
//console.log(refreshdata);
return new Promise((resolve, reject) => {
- Promise.all(gettxdata.vin.map((vin_value,vin_index) => {
+ Promise.all(gettxdata.vin.map((vin_value, vin_index) => {
//console.log(vin_index);
//console.log(vin_value);
return new Promise((resolve, reject) => {
- Promise.all(refreshdata.map((refresh_value,refresh_index) => {
+ Promise.all(refreshdata.map((refresh_value, refresh_index) => {
//console.log(refresh_index);
//console.log(refresh_value);
@@ -930,40 +963,39 @@ function EDEX_ProcessRefreshData(gettxdata,refreshdata){
}));
});
}))
- .then(result=>{
+ .then(result=> {
var res_data = result[result.length - 1],
refresh_final = [];
//console.log(res_data);
- $.each(res_data,function(index){
+ $.each(res_data,function(index) {
if(res_data[index] !== undefined) {
refresh_final.push(res_data[index]);
}
- })
+ });
//console.log(refresh_final)
resolve(refresh_final);
});
- })
+ });
}
function EDEX_GetTxIDList(gettxdata) {
return new Promise((resolve, reject) => {
- get_txid_list = []
+ get_txid_list = [];
$.each(gettxdata.vin, function(vin_index, vin_value) {
//console.log(vin_index)
//console.log(vin_value)
- get_txid_list.push(vin_value.txid)
+ get_txid_list.push(vin_value.txid);
})
//console.log(get_txid_list)
resolve(get_txid_list);
- })
+ });
}
-
-
function EDEX_RemoveTXID(_obj, txidArray) {
var txidToStr = txidArray.join(':');
- console.log(txidToStr);
+
+ console.log(txidToStr);
if (_obj, _obj.basilisk) {
if (Object.keys(_obj.basilisk).length === 0) {
console.log('no coin nodes to parse');
diff --git a/assets/scripts/iguana_api/IguanaHandle.js b/assets/scripts/iguana_api/IguanaHandle.js
index 035a1dd..c4f458c 100644
--- a/assets/scripts/iguana_api/IguanaHandle.js
+++ b/assets/scripts/iguana_api/IguanaHandle.js
@@ -33,7 +33,7 @@ function Iguana_rmd160conv(rmd160conv_data) {
function Iguana_activehandle(callback) {
return new Promise((resolve) => {
- var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth');
+ var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
ajax_data = {
'userpass': tmpIguanaRPCAuth,
'agent': 'SuperNET',
@@ -45,14 +45,16 @@ function Iguana_activehandle(callback) {
url: 'http://127.0.0.1:' + config.iguanaPort,
type: 'POST',
dataType: 'json'
- }).then(result => {
+ })
+ .then(result => {
//console.log(result);
resolve(result);
- }).fail(function(xhr, textStatus, error) {
+ })
+ .fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
- Iguana_ServiceUnavailable();
+ Iguana_ServiceUnavailable();
}
console.log(textStatus);
console.log(error);
@@ -62,7 +64,7 @@ function Iguana_activehandle(callback) {
function Iguana_Setactivehandle() {
//comment
- var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth');
+ var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
ajax_data = {
'userpass': tmpIguanaRPCAuth,
'agent': 'SuperNET',
diff --git a/assets/scripts/iguana_api/IguanaJumblr.js b/assets/scripts/iguana_api/IguanaJumblr.js
index 1ec4050..97a8ad9 100644
--- a/assets/scripts/iguana_api/IguanaJumblr.js
+++ b/assets/scripts/iguana_api/IguanaJumblr.js
@@ -2,19 +2,20 @@ function Iguana_Jumblr_SetPassphrase(data) {
return new Promise((resolve) => {
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': 'jumblr',
- 'method': 'setpassphrase',
- 'passphrase': data.passphrase
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': 'jumblr',
+ 'method': 'setpassphrase',
+ 'passphrase': data.passphrase
};
$.ajax({
- data: JSON.stringify(ajax_data),
- url: 'http://127.0.0.1:' + config.iguanaPort,
- type: 'POST',
- dataType: 'json'
- }).done(function(data) {
- resolve(data);
+ data: JSON.stringify(ajax_data),
+ url: 'http://127.0.0.1:' + config.iguanaPort,
+ type: 'POST',
+ dataType: 'json'
+ })
+ .done(function(data) {
+ resolve(data);
});
});
}
@@ -23,9 +24,9 @@ function Iguana_Jumblr_Status() {
return new Promise((resolve) => {
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': 'jumblr',
- 'method': 'status'
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': 'jumblr',
+ 'method': 'status'
};
$.ajax({
@@ -33,7 +34,8 @@ function Iguana_Jumblr_Status() {
url: 'http://127.0.0.1:' + config.iguanaPort,
type: 'POST',
dataType: 'json'
- }).done(function(data) {
+ })
+ .done(function(data) {
resolve(data);
});
});
diff --git a/assets/scripts/iguana_api/IguanaShepherd.js b/assets/scripts/iguana_api/IguanaShepherd.js
index a4b0682..cf6f469 100644
--- a/assets/scripts/iguana_api/IguanaShepherd.js
+++ b/assets/scripts/iguana_api/IguanaShepherd.js
@@ -11,8 +11,8 @@ function Shepherd_getConf(coin) {
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'] });
+ console.log(AjaxOutputData.result);
+ result.push({ 'path': AjaxOutputData.result });
},
error: function(xhr, textStatus, error) {
//console.log(xhr.statusText);
@@ -40,7 +40,7 @@ function Shepherd_setConf(coin) {
success: function(data, textStatus, jqXHR) {
var AjaxOutputData = JSON.parse(data);
console.log(AjaxOutputData);
- result.push({ 'result': AjaxOutputData['msg'] });
+ result.push({ 'result': AjaxOutputData.msg });
},
error: function(xhr, textStatus, error) {
//console.log(xhr.statusText);
@@ -71,7 +71,7 @@ function Shepherd_herd(coin,herd_data) {
success: function(data, textStatus, jqXHR) {
var AjaxOutputData = JSON.parse(data);
console.log(AjaxOutputData);
- result.push({ 'result': AjaxOutputData['msg'] });
+ result.push({ 'result': AjaxOutputData.msg });
},
error: function(xhr, textStatus, error) {
//console.log(xhr.statusText);
@@ -114,7 +114,7 @@ function Shepherd_FetchBasiliskData(req_data) {
'pubkey': session_pubkey
};
- console.log(req_data)
+ console.log(req_data);
if (req_data.allcoins !== false ) {
var req_url = 'http://127.0.0.1:17777/shepherd/cache-all';
} else {
@@ -123,14 +123,15 @@ function Shepherd_FetchBasiliskData(req_data) {
ajax_data.calls = req_data.calls;
}
- console.log(ajax_data)
+ console.log(ajax_data);
$.ajax({
type: 'GET',
data: ajax_data,
url: req_url,
contentType: 'application/json', // send as JSON
- }).done(function(data) {
+ })
+ .done(function(data) {
resolve(data);
});
});
@@ -140,6 +141,7 @@ 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 },
@@ -151,7 +153,8 @@ function Shepherd_GroomData_Get() {
data: ajax_data,
url: req_url,
contentType: 'application/json', // send as JSON
- }).done(function(data) {
+ })
+ .done(function(data) {
var res_data = JSON.parse(data);
resolve(res_data.result);
});
@@ -162,6 +165,7 @@ 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 = {
@@ -178,7 +182,8 @@ function Shepherd_GroomData_Post(req_data) {
data: ajax_data,
url: req_url,
dataType: 'json'
- }).done(function(data) {
+ })
+ .done(function(data) {
var res_data = data;
resolve(res_data);
});
@@ -189,6 +194,7 @@ 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 = {
@@ -212,7 +218,8 @@ 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,
+
+ var session_pubkey = parse_session_data.pubkey,
ajax_data = { 'pubkey': session_pubkey };
$.ajax({
@@ -220,11 +227,14 @@ function Shepherd_GetBasiliskCache() {
data: ajax_data,
url: 'http://127.0.0.1:17777/shepherd/cache',
contentType: 'application/json' // send as JSON
- }).done(function(data) {
+ })
+ .done(function(data) {
resolve(data);
data = JSON.parse(data);
+
if (data.result === 'JSON parse error') {
- Shepherd_GroomData_Delete().then(function(result) {
+ Shepherd_GroomData_Delete()
+ .then(function(result) {
console.log('error reading cache, flushing...');
});
}
@@ -234,7 +244,8 @@ function Shepherd_GetBasiliskCache() {
function Shepherd_CheckBasiliskCacheData(coin) {
return new Promise((resolve) => {
- Shepherd_GetBasiliskCache().then(function(result) {
+ Shepherd_GetBasiliskCache()
+ .then(function(result) {
var _data = JSON.parse(result),
query = _data.result.basilisk,
coin_exists = true,
@@ -277,7 +288,7 @@ function Shepherd_CheckBasiliskCacheData(coin) {
'listunspent': false,
'refresh': false
};
- resolve(res_data)
+ resolve(res_data);
} else {
Promise.all(query[coin].addresses.map((coinaddr_value,coinaddr_index) => {
return new Promise((resolve, reject) => {
@@ -311,7 +322,8 @@ function Shepherd_CheckBasiliskCacheData(coin) {
};
resolve(pass_data);
});
- })).then(result => {
+ }))
+ .then(result => {
var res_data = result[result.length - 1];
res_data.coin = coin_exists;
res_data.addresses = addresses_exists;
diff --git a/assets/scripts/jumblr.js b/assets/scripts/jumblr.js
index 696d850..36149fd 100644
--- a/assets/scripts/jumblr.js
+++ b/assets/scripts/jumblr.js
@@ -14,7 +14,8 @@ var Jumblr = function() {
// clearInterval(CheckIfIguanaRunning);
// console.log('=> No wallet logged in, or Dashboard not ative. No need to Run History.');
} else {
- Jumblr_CheckIfConnected().then(function(result) {
+ Jumblr_CheckIfConnected()
+ .then(function(result) {
console.log(result);
if (result == 'connected') {
Jumblr_DisplayAddresses();
@@ -25,7 +26,8 @@ var Jumblr = function() {
}
$('#jumblr_actions_header').click(function() {
- Jumblr_CheckIfConnected().then(function(result) {
+ Jumblr_CheckIfConnected()
+ .then(function(result) {
console.log(result);
if (result == 'connected') {
Jumblr_DisplayAddresses();
@@ -45,7 +47,8 @@ var Jumblr = function() {
}();
function Jumblr_ShowHideAlert() {
- Jumblr_LookforNativeKomodo().then(function(result) {
+ Jumblr_LookforNativeKomodo()
+ .then(function(result) {
// console.log(result)
if (result === 'isnative') {
$('#jumblr_no_native_kmd_alert').hide();
@@ -65,7 +68,8 @@ function Jumblr_DisplayAddresses() {
}
function Jumblr_DisplayStatus() {
- Iguana_Jumblr_Status().then(function(result) {
+ Iguana_Jumblr_Status()
+ .then(function(result) {
//console.log(result)
/*$('#jumblr_status_BTCdeposit').text(result.BTCdeposit)
$('#jumblr_status_BTCjumblr').text(result.BTCjumblr)
@@ -87,7 +91,7 @@ function Jumblr_DisplayStatus() {
$('#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() {
@@ -115,7 +119,8 @@ function Jumblr_LookforNativeKomodo() {
} else {
resolve('notnative');
}
- }).fail(function(xhr, textStatus, error) {
+ })
+ .fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
@@ -144,7 +149,8 @@ function Jumblr_CheckIfConnected() {
type: 'POST',
data: JSON.stringify(ajax_data),
url: 'http://127.0.0.1:' + config.iguanaPort
- }).done(function(data){
+ })
+ .done(function(data) {
data = JSON.parse(data);
if ( data.errors != undefined ) {
resolve('connected');
diff --git a/assets/scripts/kmd_wallet/KMDAddress.js b/assets/scripts/kmd_wallet/KMDAddress.js
index e4a7216..a45e93d 100644
--- a/assets/scripts/kmd_wallet/KMDAddress.js
+++ b/assets/scripts/kmd_wallet/KMDAddress.js
@@ -5,21 +5,21 @@ function KMDListaddrZ() {
if (passthru_agent == 'iguana') {
var ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': passthru_agent,
- 'method': 'passthru',
- 'asset': $('[data-extcoin]').attr('data-extcoin'),
- 'function': 'z_listaddresses',
- 'hex': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'z_listaddresses',
+ 'hex': ''
+ };
}
$.ajax({
@@ -39,21 +39,21 @@ function KMDListaddrZ() {
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
- };
+ '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
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'z_getbalance',
+ 'hex': tmpZaddrs_output
+ };
}
$.ajax({
@@ -129,21 +129,21 @@ function KMDListAddresses(pubpriv) {
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
- };
+ '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
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': ajax_function_input,
+ 'hex': tmplistaddr_hex_input
+ };
}
$.ajax({
@@ -195,21 +195,21 @@ function KMDGetNewAddresses(pubpriv) {
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': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': ajax_function_input,
+ 'hex': ''
+ };
}
$.ajax({
diff --git a/assets/scripts/kmd_wallet/KMDBalance.js b/assets/scripts/kmd_wallet/KMDBalance.js
index 18ca255..e4af2c6 100644
--- a/assets/scripts/kmd_wallet/KMDBalance.js
+++ b/assets/scripts/kmd_wallet/KMDBalance.js
@@ -11,21 +11,21 @@ function getTotalKMDBalance() {
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'
- };
+ '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'
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'z_gettotalbalance',
+ 'hex': '3000'
+ };
}
//console.log(ajax_data);
@@ -41,21 +41,27 @@ function getTotalKMDBalance() {
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');
- $('#kmd_widget_get_total_balance_t').removeClass('col-lg-4');
- $('#kmd_widget_get_total_balance_z').addClass(' col-lg-3');
- $('#kmd_widget_get_total_balance_z').removeClass(' col-lg-4');
- $('#kmd_widget_get_total_balance_tzi').addClass(' col-lg-3');
- $('#kmd_widget_get_total_balance_tzi').removeClass(' col-lg-4');
+ $('#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');
- $('#kmd_widget_get_total_balance_t').removeClass(' col-lg-3');
- $('#kmd_widget_get_total_balance_z').addClass(' col-lg-4');
- $('#kmd_widget_get_total_balance_z').removeClass(' col-lg-3');
- $('#kmd_widget_get_total_balance_tzi').addClass(' col-lg-4');
- $('#kmd_widget_get_total_balance_tzi').removeClass(' col-lg-3');
+ $('#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);
@@ -79,21 +85,21 @@ function getKMDBalanceT() {
if (passthru_agent == 'iguana') {
var ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': passthru_agent,
- 'method': 'passthru',
- 'asset': $('[data-extcoin]').attr('data-extcoin'),
- 'function': 'getbalance',
- 'hex': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'getbalance',
+ 'hex': ''
+ };
}
console.log(ajax_data);
@@ -122,21 +128,21 @@ function getKMDBalanceZ() {
if (passthru_agent == 'iguana') {
var ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': passthru_agent,
- 'method': 'passthru',
- 'asset': $('[data-extcoin]').attr('data-extcoin'),
- 'function': 'z_getbalance',
- 'hex': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'z_getbalance',
+ 'hex': ''
+ };
}
console.log(ajax_data);
diff --git a/assets/scripts/kmd_wallet/KMDGetinfo.js b/assets/scripts/kmd_wallet/KMDGetinfo.js
index 4a7ac7f..d9c9085 100644
--- a/assets/scripts/kmd_wallet/KMDGetinfo.js
+++ b/assets/scripts/kmd_wallet/KMDGetinfo.js
@@ -4,21 +4,21 @@ function getKMDWalletInfo() {
if (passthru_agent == 'iguana') {
var ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': passthru_agent,
- 'method': 'passthru',
- 'asset': $('[data-extcoin]').attr('data-extcoin'),
- 'function': 'getwalletinfo',
- 'hex': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'getwalletinfo',
+ 'hex': ''
+ };
}
console.log(ajax_data);
@@ -52,21 +52,21 @@ function getKMDInfo() {
if (passthru_agent == 'iguana') {
var ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': passthru_agent,
- 'method': 'passthru',
- 'asset': $('[data-extcoin]').attr('data-extcoin'),
- 'function': 'getinfo',
- 'hex': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'getinfo',
+ 'hex': ''
+ };
}
console.log(ajax_data);
diff --git a/assets/scripts/kmd_wallet/KMDInit.js b/assets/scripts/kmd_wallet/KMDInit.js
index a2d3440..aca9099 100644
--- a/assets/scripts/kmd_wallet/KMDInit.js
+++ b/assets/scripts/kmd_wallet/KMDInit.js
@@ -79,7 +79,7 @@ function RunKMDInitFunctions() {
$.ajax({
type: 'GET',
- url: 'http://localhost:' + config.iguanaPort + '/api/dex/getinfo?userpass=tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth') + '&symbol='+extcoin,
+ url: 'http://localhost:' + config.iguanaPort + '/api/dex/getinfo?userpass=tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth') + '&symbol=' + extcoin,
success: function(data, textStatus, jqXHR) {
data = JSON.parse(data);
@@ -136,13 +136,18 @@ function RunKMDInitFunctions() {
}, 2000);
}
- getRemoteCurrentHeight();
-
- var totalBlocksInExplorer = 0,
- totalBlocksInExplorerInterval = setInterval(function() {
+ if (sessionStorage.getItem('edexTmpMode') === 'Native') {
getRemoteCurrentHeight();
- _getKMDInfo();
- }, 60000);
+
+ var totalBlocksInExplorer = 0,
+ totalBlocksInExplorerInterval = setInterval(function() {
+ getRemoteCurrentHeight();
+ _getKMDInfo();
+ }, 60000);
+ } else {
+ clearInterval(totalBlocksInExplorerInterval);
+ clearInterval(currentBestBlockInterval);
+ }
$('#kmd_wallet_dashoard_section').show();
$('#kmd_wallet_dashboardinfo').show();
diff --git a/assets/scripts/kmd_wallet/KMDSendTx.js b/assets/scripts/kmd_wallet/KMDSendTx.js
index af4b64a..86d9f8b 100644
--- a/assets/scripts/kmd_wallet/KMDSendTx.js
+++ b/assets/scripts/kmd_wallet/KMDSendTx.js
@@ -11,23 +11,23 @@ function KMDZSendManyTransaction() {
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
- };
+ '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
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'z_sendmany',
+ 'hex': zsendmoney_output
+ };
}
-
+
$.ajax({
async: false,
type: 'POST',
@@ -55,7 +55,10 @@ function KMDZSendManyTransaction() {
function clearSendManyFieldData() {
$('.showkmdwalletaddrs').selectpicker('refresh');
- $('#kmd_wallet_sendto').val('');
+ $(
+ '#kmd_wallet_sendto,' +
+ '#kmd_wallet_amount'
+ )
+ .val('');
$('#kmd_wallet_total_value').text('');
- $('#kmd_wallet_amount').val('');
}
\ No newline at end of file
diff --git a/assets/scripts/kmd_wallet/KMDTransaction.js b/assets/scripts/kmd_wallet/KMDTransaction.js
index db062ce..5751f12 100644
--- a/assets/scripts/kmd_wallet/KMDTransaction.js
+++ b/assets/scripts/kmd_wallet/KMDTransaction.js
@@ -14,21 +14,21 @@ function KMDGetPublicTransactions() {
if (passthru_agent == 'iguana') {
var ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': passthru_agent,
- 'method': 'passthru',
- 'asset': $('[data-extcoin]').attr('data-extcoin'),
- 'function': 'listtransactions',
- 'hex': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'listtransactions',
+ 'hex': ''
+ };
}
$.ajax({
@@ -112,21 +112,21 @@ function KMDGetProtectedTransactions() {
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
- };
+ '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
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'z_listreceivedbyaddress',
+ 'hex': tmpzaddr_hex_input
+ };
}
$.ajax({
diff --git a/assets/scripts/kmd_wallet/KMDTransactionInfo.js b/assets/scripts/kmd_wallet/KMDTransactionInfo.js
index bbe52ca..8b43b0c 100644
--- a/assets/scripts/kmd_wallet/KMDTransactionInfo.js
+++ b/assets/scripts/kmd_wallet/KMDTransactionInfo.js
@@ -14,21 +14,21 @@ function KMDlistunspentT() {
if (passthru_agent == 'iguana') {
var ajax_data = {
- 'userpass': tmpIguanaRPCAuth,
- 'agent': passthru_agent,
- 'method': 'passthru',
- 'asset': $('[data-extcoin]').attr('data-extcoin'),
- 'function': 'listunspent',
- 'hex': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'listunspent',
+ 'hex': ''
+ };
}
$.ajax({
@@ -80,21 +80,21 @@ function KMDGetTransactionIDInfo(txid) {
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
- };
+ '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
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'gettransaction',
+ 'hex': tmptxid_output
+ };
}
$.ajax({
@@ -136,21 +136,21 @@ function KMDGetOPIDInfo(opid) {
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
- };
+ '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
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'z_getoperationstatus',
+ 'hex': tmpopid_output
+ };
}
$.ajax({
diff --git a/assets/scripts/kmd_wallet/KMDWalletDashboard.js b/assets/scripts/kmd_wallet/KMDWalletDashboard.js
index f038c68..12a6f5b 100644
--- a/assets/scripts/kmd_wallet/KMDWalletDashboard.js
+++ b/assets/scripts/kmd_wallet/KMDWalletDashboard.js
@@ -10,11 +10,17 @@ var KMDWalletDashboard = function() {
if ( sessionStorage.getItem('edexTmpMode') === 'Basilisk' || sessionStorage.getItem('edexTmpMode') === 'Full' ) {
sessionStorage.setItem('edexTmpRefresh', 'stop');
}
- $('#kmd_wallet_dashoard_section').show();
- $('#kmd_wallet_dashboardinfo').show();
- $('#kmd_wallet_send').hide();
- $('#kmd_wallet_recieve_section').hide();
- $('#kmd_wallet_settings').hide();
+ $(
+ '#kmd_wallet_dashoard_section,' +
+ '#kmd_wallet_dashboardinfo'
+ )
+ .show();
+ $(
+ '#kmd_wallet_send,' +
+ '#kmd_wallet_recieve_section,' +
+ '#kmd_wallet_settings'
+ )
+ .hide();
getTotalKMDBalance();
KMDfillTxHistoryT();
clearSendManyFieldData();
@@ -53,10 +59,13 @@ var KMDWalletDashboard = function() {
KMDListAllOPIDs();
sessionStorage.setItem('edexTmpRefresh', 'stop');
- $('#kmd_wallet_dashboardinfo').hide();
$('#kmd_wallet_send').show();
- $('#kmd_wallet_recieve_section').hide();
- $('#kmd_wallet_settings').hide();
+ $(
+ '#kmd_wallet_dashboardinfo,' +
+ '#kmd_wallet_recieve_section,' +
+ '#kmd_wallet_settings'
+ )
+ .hide();
var kmd_addr_list_with_balance = KMDlistunspentT();
@@ -199,10 +208,13 @@ var KMDWalletDashboard = function() {
$('#btn_' + action_btn_code + '_wallet_settings').click(function() {
console.log('wallet settings button clicked...');
sessionStorage.setItem('edexTmpRefresh', 'stop');
- $('#kmd_wallet_dashboardinfo').hide();
- $('#kmd_wallet_dashoard_section').hide();
- $('#kmd_wallet_send').hide();
- $('#kmd_wallet_recieve_section').hide();
+ $(
+ '#kmd_wallet_dashboardinfo,' +
+ '#kmd_wallet_dashoard_section,' +
+ '#kmd_wallet_send,' +
+ '#kmd_wallet_recieve_section'
+ )
+ .hide();
$('#kmd_wallet_settings').show();
getKMDWalletInfo();
getKMDInfo();
@@ -215,11 +227,14 @@ var KMDWalletDashboard = function() {
$('#btn_' + action_btn_code + '_wallet_recieve').click(function() {
sessionStorage.setItem('edexTmpRefresh', 'stop');
- $('#kmd_wallet_dashboardinfo').hide();
- $('#kmd_wallet_dashoard_section').hide();
- $('#kmd_wallet_send').hide();
+ $(
+ '#kmd_wallet_dashboardinfo,' +
+ '#kmd_wallet_dashoard_section,' +
+ '#kmd_wallet_send,' +
+ '#kmd_wallet_settings'
+ )
+ .hide();
$('#kmd_wallet_recieve_section').show();
- $('#kmd_wallet_settings').hide();
KMDListAllAddr();
clearSendManyFieldData();
});
diff --git a/assets/scripts/kmd_wallet_dashboard.js b/assets/scripts/kmd_wallet_dashboard.js
index 6308c0a..30eb31a 100644
--- a/assets/scripts/kmd_wallet_dashboard.js
+++ b/assets/scripts/kmd_wallet_dashboard.js
@@ -39,116 +39,115 @@ function getHeaderActionMenuButtonCoinCode() {
if ( extcoin == 'KMD') { action_menu_button_code = 'kmd'; };
if ( extcoin == 'ZEC') { action_menu_button_code = 'zec'; };
- if ( extcoin == 'SUPERNET'
- || extcoin == 'REVS'
- || extcoin == 'DEX'
- || extcoin == 'PANGEA'
- || extcoin == 'JUMBLR'
- || extcoin == 'BET'
- || extcoin == 'CRYPTO'
- || extcoin == 'HODL'
- || extcoin == 'SHARK'
- || extcoin == 'BOTS'
- || extcoin == 'MGW'
- || extcoin == 'MVP'
- || extcoin == 'WIRELESS'
- || extcoin == 'KV'
- || extcoin == 'CEAL'
- || extcoin == 'MESH'
-
- || extcoin == 'USD'
- || extcoin == 'RON'
- || extcoin == 'EUR'
- || extcoin == 'JPY'
- || extcoin == 'GBP'
- || extcoin == 'AUD'
- || extcoin == 'CAD'
- || extcoin == 'CHF'
- || extcoin == 'NZD'
- || extcoin == 'CNY'
- || extcoin == 'RUB'
- || extcoin == 'MXN'
- || extcoin == 'BRL'
- || extcoin == 'INR'
- || extcoin == 'HKD'
- || extcoin == 'TRY'
- || extcoin == 'ZAR'
- || extcoin == 'PLN'
- || extcoin == 'NOK'
- || extcoin == 'SEK'
- || extcoin == 'DKK'
- || extcoin == 'CZK'
- || extcoin == 'HUF'
- || extcoin == 'ILS'
- || extcoin == 'KRW'
- || extcoin == 'MYR'
- || extcoin == 'PHP'
- || extcoin == 'SGD'
- || extcoin == 'THB'
- || extcoin == 'BGN'
- || extcoin == 'IDR'
- || extcoin == 'HRK' ) { action_menu_button_code = 'acpax'; };
+ if (extcoin == 'SUPERNET' ||
+ extcoin == 'REVS' ||
+ extcoin == 'DEX' ||
+ extcoin == 'PANGEA' ||
+ extcoin == 'JUMBLR' ||
+ extcoin == 'BET' ||
+ extcoin == 'CRYPTO' ||
+ extcoin == 'HODL' ||
+ extcoin == 'SHARK' ||
+ extcoin == 'BOTS' ||
+ extcoin == 'MGW' ||
+ extcoin == 'MVP' ||
+ extcoin == 'WIRELESS' ||
+ extcoin == 'KV' ||
+ extcoin == 'CEAL' ||
+ extcoin == 'MESH' ||
+ extcoin == 'USD' ||
+ extcoin == 'RON' ||
+ extcoin == 'EUR' ||
+ extcoin == 'JPY' ||
+ extcoin == 'GBP' ||
+ extcoin == 'AUD' ||
+ extcoin == 'CAD' ||
+ extcoin == 'CHF' ||
+ extcoin == 'NZD' ||
+ extcoin == 'CNY' ||
+ extcoin == 'RUB' ||
+ extcoin == 'MXN' ||
+ extcoin == 'BRL' ||
+ extcoin == 'INR' ||
+ extcoin == 'HKD' ||
+ extcoin == 'TRY' ||
+ extcoin == 'ZAR' ||
+ extcoin == 'PLN' ||
+ extcoin == 'NOK' ||
+ extcoin == 'SEK' ||
+ extcoin == 'DKK' ||
+ extcoin == 'CZK' ||
+ extcoin == 'HUF' ||
+ extcoin == 'ILS' ||
+ extcoin == 'KRW' ||
+ extcoin == 'MYR' ||
+ extcoin == 'PHP' ||
+ extcoin == 'SGD' ||
+ extcoin == 'THB' ||
+ extcoin == 'BGN' ||
+ extcoin == 'IDR' ||
+ extcoin == 'HRK') { 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 ( extcoin == 'SUPERNET'
- || extcoin == 'REVS'
- || extcoin == 'DEX'
- || extcoin == 'PANGEA'
- || extcoin == 'JUMBLR'
- || extcoin == 'BET'
- || extcoin == 'CRYPTO'
- || extcoin == 'HODL'
- || extcoin == 'SHARK'
- || extcoin == 'BOTS'
- || extcoin == 'MGW'
- || extcoin == 'MVP'
- || extcoin == 'WIRELESS'
- || extcoin == 'KV'
- || extcoin == 'CEAL'
- || extcoin == 'MESH'
- || extcoin == 'USD'
- || extcoin == 'RON'
- || extcoin == 'EUR'
- || extcoin == 'JPY'
- || extcoin == 'GBP'
- || extcoin == 'AUD'
- || extcoin == 'CAD'
- || extcoin == 'CHF'
- || extcoin == 'NZD'
- || extcoin == 'CNY'
- || extcoin == 'RUB'
- || extcoin == 'MXN'
- || extcoin == 'BRL'
- || extcoin == 'INR'
- || extcoin == 'HKD'
- || extcoin == 'TRY'
- || extcoin == 'ZAR'
- || extcoin == 'PLN'
- || extcoin == 'NOK'
- || extcoin == 'SEK'
- || extcoin == 'DKK'
- || extcoin == 'CZK'
- || extcoin == 'HUF'
- || extcoin == 'ILS'
- || extcoin == 'KRW'
- || extcoin == 'MYR'
- || extcoin == 'PHP'
- || extcoin == 'SGD'
- || extcoin == 'THB'
- || extcoin == 'BGN'
- || extcoin == 'IDR'
- || extcoin == 'HRK' ) { passthru_agent = 'iguana'; };
+ if (extcoin == 'SUPERNET' ||
+ extcoin == 'REVS' ||
+ extcoin == 'DEX' ||
+ extcoin == 'PANGEA' ||
+ extcoin == 'JUMBLR' ||
+ extcoin == 'BET' ||
+ extcoin == 'CRYPTO' ||
+ extcoin == 'HODL' ||
+ extcoin == 'SHARK' ||
+ extcoin == 'BOTS' ||
+ extcoin == 'MGW' ||
+ extcoin == 'MVP' ||
+ extcoin == 'WIRELESS' ||
+ extcoin == 'KV' ||
+ extcoin == 'CEAL' ||
+ extcoin == 'MESH' ||
+ extcoin == 'USD' ||
+ extcoin == 'RON' ||
+ extcoin == 'EUR' ||
+ extcoin == 'JPY' ||
+ extcoin == 'GBP' ||
+ extcoin == 'AUD' ||
+ extcoin == 'CAD' ||
+ extcoin == 'CHF' ||
+ extcoin == 'NZD' ||
+ extcoin == 'CNY' ||
+ extcoin == 'RUB' ||
+ extcoin == 'MXN' ||
+ extcoin == 'BRL' ||
+ extcoin == 'INR' ||
+ extcoin == 'HKD' ||
+ extcoin == 'TRY' ||
+ extcoin == 'ZAR' ||
+ extcoin == 'PLN' ||
+ extcoin == 'NOK' ||
+ extcoin == 'SEK' ||
+ extcoin == 'DKK' ||
+ extcoin == 'CZK' ||
+ extcoin == 'HUF' ||
+ extcoin == 'ILS' ||
+ extcoin == 'KRW' ||
+ extcoin == 'MYR' ||
+ extcoin == 'PHP' ||
+ extcoin == 'SGD' ||
+ extcoin == 'THB' ||
+ extcoin == 'BGN' ||
+ extcoin == 'IDR' ||
+ extcoin == 'HRK') { passthru_agent = 'iguana'; };
return passthru_agent;
}
@@ -158,24 +157,24 @@ function CheckIfConnected() {
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': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'getinfo',
+ 'hex': ''
+ };
}
console.log(ajax_data);
@@ -218,24 +217,24 @@ 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': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'function': 'walletlock',
+ 'hex': ''
+ };
}
console.log(ajax_data);
@@ -274,25 +273,25 @@ function KMD_getInfo_rtrn() {
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': ''
- };
+ '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': ''
- };
+ 'userpass': tmpIguanaRPCAuth,
+ 'agent': passthru_agent,
+ 'method': 'passthru',
+ 'asset': $('[data-extcoin]').attr('data-extcoin'),
+ 'function': 'getinfo',
+ 'hex': ''
+ };
}
$.ajax({
diff --git a/assets/scripts/lang/en.js b/assets/scripts/lang/en.js
index 0725a05..07143a8 100644
--- a/assets/scripts/lang/en.js
+++ b/assets/scripts/lang/en.js
@@ -174,7 +174,9 @@ const _lang = {
'TARGET': 'Target',
'LOAD_DEBUG_LOG': 'Load debug log',
'REFRESH_FUNDS': 'Refresh Funds',
- 'INFO': 'Info'
+ 'INFO': 'Info',
+ 'ENTER': 'Enter',
+ 'ADDR_SM': 'address'
},
'JUMBLR': {
'NOTICE': 'EXPERIMENTAL TEST VERSION ONLY',
@@ -263,6 +265,8 @@ const _lang = {
'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',
@@ -310,7 +314,8 @@ const _lang = {
'TX': 'Transaction'
},
'IAPI': {
- 'PUBLIC_SM': 'public'
+ 'PUBLIC_SM': 'public',
+ 'CON_STATUS': 'Connection status'
},
'KMD_NATIVE': {
'SELECT_ADDRESS': 'Select Transparent or Private Address',
diff --git a/assets/scripts/login.js b/assets/scripts/login.js
index a7b8e4a..25bff4e 100644
--- a/assets/scripts/login.js
+++ b/assets/scripts/login.js
@@ -36,12 +36,15 @@ var Login = function() {
highlight: function(element) { // hightlight error inputs
$(element)
- .closest('.form-group').addClass('has-error'); // set error class to the control group
+ .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();
+ label
+ .closest('.form-group')
+ .removeClass('has-error')
+ .remove();
},
errorPlacement: function(error, element) {
@@ -51,10 +54,11 @@ var Login = function() {
submitHandler: function(form) {
var jumblr_setpassphrase_val = 'jumblr ' + $('#password').val();
console.log(jumblr_setpassphrase_val);
- Iguana_Jumblr_SetPassphrase({ 'passphrase': jumblr_setpassphrase_val }).then(function(result) {
+ Iguana_Jumblr_SetPassphrase({ 'passphrase': jumblr_setpassphrase_val })
+ .then(function(result) {
console.log(result);
})
- .then(function(){
+ .then(function() {
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
ajax_data = {
'userpass': tmpIguanaRPCAuth,
@@ -76,12 +80,14 @@ var Login = function() {
sessionStorage.setItem('IguanaActiveAccount', LoginDataToStore);
if (LoginOutput.result === 'success') {
console.log('Success');
- toastr.success(_lang[defaultLang].TOASTR.LOGIN_SUCCESSFULL, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION)
+ 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( '' );
+ $('body')
+ .removeClass( 'page-login layout-full page-dark' )
+ .addClass( '' );
$('link[id=loginStyle]')[0].disabled = true;
location.reload();
@@ -143,11 +149,20 @@ var Login = function() {
})
$('#section-dashboard').show();
- $('#section-easydex').hide();
- $('#section-about-iguana').hide();
- $('#nav-dashboard').removeClass( '' ).addClass( 'active open' );
- $('#nav-easydex').removeClass( 'active open' ).addClass( '' );
- $('#nav-about-iguana').removeClass( 'active open' ).addClass( '' );
+ $(
+ '#section-easydex,' +
+ '#section-about-iguana'
+ )
+ .hide();
+ $('#nav-dashboard')
+ .removeClass( '' )
+ .addClass( 'active open' );
+ $(
+ '#nav-easydex,' +
+ '#nav-about-iguana'
+ )
+ .removeClass( 'active open' )
+ .addClass( '' );
}
});
@@ -164,15 +179,15 @@ var Login = function() {
$('input[name=PassPhraseOptions]').on('change', function() {
if ( $('input[name=PassPhraseOptions]:checked', '.register-form').val() === 'PassPhraseOptionsIguana' ) {
console.log('PassPhraseOptionsIguana');
- $('#walletseed').text(PassPhraseGenerator.generatePassPhrase(256))
+ $('#walletseed').text(PassPhraseGenerator.generatePassPhrase(256));
}
if ( $('input[name=PassPhraseOptions]:checked', '.register-form').val() === 'PassPhraseOptionsWaves' ) {
console.log('PassPhraseOptionsWaves');
- $('#walletseed').text(PassPhraseGenerator.generatePassPhrase(160))
+ $('#walletseed').text(PassPhraseGenerator.generatePassPhrase(160));
}
if ( $('input[name=PassPhraseOptions]:checked', '.register-form').val() === 'PassPhraseOptionsNXT' ) {
console.log('PassPhraseOptionsNXT');
- $('#walletseed').text(PassPhraseGenerator.generatePassPhrase(128))
+ $('#walletseed').text(PassPhraseGenerator.generatePassPhrase(128));
}
});
}
@@ -204,12 +219,15 @@ var Login = function() {
highlight: function(element) { // hightlight error inputs
$(element)
- .closest('.form-group').addClass('has-error'); // set error class to the control group
+ .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();
+ label
+ .closest('.form-group')
+ .removeClass('has-error')
+ .remove();
},
errorPlacement: function(error, element) {
@@ -262,8 +280,9 @@ var Login = function() {
console.log(CreateWalletOutput);
if (CreateWalletOutput.error === 'bitcoinrpc needs coin that is active') {
- toastr.info(_lang[defaultLang].TOASTR.NO_COIN_RUNNING, _lang[defaultLang].TOASTR.COIN_NOTIFICATION);
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);
@@ -326,9 +345,12 @@ var Login = function() {
$('#section-login').fadeIn();
$('#section-register').hide();
$('#walletseed').text(PassPhraseGenerator.generatePassPhrase(256));
- $('#rwalletseed').val('');
- $('#register_password').val('');
- $('#rpassword').val('');
+ $(
+ '#rwalletseed,' +
+ '#register_password,' +
+ '#rpassword'
+ )
+ .val('');
});
}
});
@@ -384,17 +406,22 @@ var Login = function() {
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' );
+ $('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('Welcome.');
- $('#wallet-handle').show();
- $('.create-account').show();
- $('#register-btn').show();
+ $('#login-welcome').text(_lang[defaultLang].LOGIN.WELCOME + '.');
+ $(
+ '#wallet-handle,' +
+ '.create-account,' +
+ '#register-btn'
+ )
+ .show();
$('#logint-another-wallet').hide();
- $("#loginbtn").text('Sign in');
+ $("#loginbtn").text(_lang[defaultLang].LOGIN.SIGN_IN);
//Stop SetInterval Calls
StopShowCoinHistory();
@@ -468,16 +495,21 @@ var Login = function() {
toastr.success(_lang[defaultLang].TOASTR.WALLET_LOCKED, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION);
$('#wallet-login').show();
- $('body').removeClass( '' ).addClass( 'page-login layout-full page-dark' );
+ $('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').hide();
+ $(
+ '#register-btn,' +
+ '#logincoinslist'
+ )
+ .hide();
$('#logint-another-wallet').show();
- $('#logincoinslist').hide();
} else {
// If something goes wrong, alert the error message that our service returned
toastr.warning(_lang[defaultLang].TOASTR.OPPS, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION);
@@ -523,7 +555,8 @@ var Login = 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) {
+ Iguana_CheckActiveCoins()
+ .then(function(result) {
if (result.length !== 0 ) {
$('#section-login-addcoin-btn').hide();
$('#section-login').show();
@@ -532,7 +565,8 @@ var Login = function() {
} else {
var CheckLoginData = JSON.parse(sessionStorage.getItem('IguanaActiveAccount'));
- Iguana_activehandle().then(function(result) {
+ Iguana_activehandle()
+ .then(function(result) {
if ( JSON.parse(CheckLoginData).pubkey != result.pubkey ) {
ClearOnLogout(false, false);
}
@@ -542,14 +576,19 @@ var Login = function() {
console.log(JSON.parse(CheckLoginData).status);
$('#password').val('')
$('#wallet-login').hide();
- $('body').removeClass( 'page-login layout-full page-dark' ).addClass( '' );
+ $('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').hide();
+ $(
+ '#register-btn,' +
+ '#section-login-addcoin-btn'
+ )
+ .hide();
$("#loginbtn").text(_lang[defaultLang].LOGIN.UNLOCK);
- $('#section-login-addcoin-btn').hide();
$('#section-login').show();
}
}
@@ -563,7 +602,8 @@ var Login = function() {
};
var handleCoinsRunningCheck = function() {
- Iguana_CheckActiveCoins().then(function(result) {
+ Iguana_CheckActiveCoins()
+ .then(function(result) {
if (result.length !== 0 ) {
$('#section-login-addcoin-btn').hide();
$('#section-login').show();
@@ -673,17 +713,22 @@ var Login = function() {
toastr.success(_lang[defaultLang].TOASTR.LOGOUT_SUCCESSFULL, _lang[defaultLang].TOASTR.ACCOUNT_NOTIFICATION);
$('#wallet-login').show();
- $('body').removeClass( '' ).addClass( 'page-login layout-full page-dark' );
+ $('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').show();
- $('#register-btn').show();
+ $(
+ '.create-account,' +
+ '#register-btn,' +
+ '#logincoinslist'
+ )
+ .show();
$('#logint-another-wallet').hide();
$("#loginbtn").text(_lang[defaultLang].LOGIN.SIGN_IN);
- $('#logincoinslist').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);
@@ -712,92 +757,99 @@ var Login = function() {
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);
- $('#addcoin_mdl_full_mode_login').prop('checked', false);
+ $('#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() {
+ $( "#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);
- $('#addcoin_mdl_full_mode_login').prop('checked', 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);
+ $('#addcoin_mdl_basilisk_mode_login')
+ .prop('disabled', false)
+ .prop('checked', true);
$('#addcoin_mdl_full_mode_login').prop('disabled', false);
- $('#addcoin_mdl_basilisk_mode_login').prop('checked', true);
}
- if (tmp_coin_val == 'SUPERNET'
- || tmp_coin_val == 'REVS'
- || tmp_coin_val == 'WIRELESS'
- || 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' ) {
+ if (tmp_coin_val == 'SUPERNET' ||
+ tmp_coin_val == 'REVS' ||
+ tmp_coin_val == 'WIRELESS' ||
+ 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);
+ $('#addcoin_mdl_basilisk_mode_login')
+ .prop('disabled', false)
+ .prop('checked', true);
$('#addcoin_mdl_full_mode_login').prop('disabled', true);
- $('#addcoin_mdl_basilisk_mode_login').prop('checked', 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);
- $('#addcoin_mdl_full_mode_login').prop('checked', 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('disabled', false)
+ .prop('checked', true);
$('#addcoin_mdl_full_mode_login').prop('disabled', true);
- $('#addcoin_mdl_native_mode_login').prop('checked', true);
}
});
}
@@ -810,7 +862,9 @@ var Login = function() {
// 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');
+ $(value)
+ .removeClass('col-lg-4 col-md-4')
+ .addClass('col-lg-6 col-md-6');
}
if ( index == 2 ) {
$(value).hide();
@@ -820,7 +874,9 @@ var Login = function() {
// 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');
+ $(value)
+ .removeClass('col-lg-4 col-md-4')
+ .addClass('col-lg-6 col-md-6');
}
if ( index == 2 ) {
$(value).hide();
@@ -840,7 +896,7 @@ var Login = function() {
handleCheckLogin();
handleLoginAnotherWallet();
handleAddCoinLoginBtn();
- handleAddCoinOSOptions();
+ handleAddCoinOSOptions();
}
};
}();
@@ -865,16 +921,24 @@ function ClearOnLogout(cleardata, stopinterval) {
console.log('SetInterval data not cleared.');
}
$('#wallet-login').show();
- $('body').removeClass( '' ).addClass( 'page-login layout-full page-dark' );
- $('#wallet-core').hide();
+ $('body')
+ .removeClass( '' )
+ .addClass( 'page-login layout-full page-dark' );
+ $(
+ '#wallet-core,' +
+ '#logint-another-wallet'
+ )
+ .hide();
$('link[id=loginStyle]')[0].disabled = false;
- $('#logint-another-wallet').hide();
// Make sure these fields are unhidden.
$('#login-welcome').text(_lang[defaultLang].LOGIN.WELCOME);
- $('#wallet-handle').show();
- $('.create-account').show();
- $('#register-btn').show();
+ $(
+ '#wallet-handle,' +
+ '.create-account,' +
+ '#register-btn'
+ )
+ .show();
$('#logint-another-wallet').hide();
$("#loginbtn").text(_lang[defaultLang].LOGIN.SIGN_IN);
}
\ No newline at end of file
diff --git a/assets/scripts/walletsettings.js b/assets/scripts/walletsettings.js
index 6928def..b9219a8 100644
--- a/assets/scripts/walletsettings.js
+++ b/assets/scripts/walletsettings.js
@@ -15,7 +15,7 @@ var WalletSettings = function() {
}
},
submitHandler: function(form) {
- console.log('wait till peer ip added to selected coin...')
+ console.log('wait till peer ip added to selected coin...');
var Getwifkeys_passphrase = $('#wifkeys_passphrase').val(),
WifKeyDivContent = '';
@@ -24,91 +24,63 @@ var WalletSettings = function() {
$.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']);
- WifKeyDivContent += '';
- WifKeyDivContent += '' +
- '' +
- '' + wifkey_coin_handle + '' +
- ' | ' +
- '' + EncryptWalletDataOutput[wifkey_coin_handle] + ' | ' +
- ' ';
- WifKeyDivContent += '' +
- '' +
- '' + wifkey_coin_handle + 'Wif' +
- ' | ' +
- '' + EncryptWalletDataOutput[wifkey_coin_handle + 'wif'] + ' | ' +
- ' ';
- WifKeyDivContent += ' ';
- $('#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);
- }
- });
- });
+ '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]);
- //Second run walletpassphrase again to make sure wallet is unlocked as before login.
- var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
- WalletPassphrase_ajax_data = {
+ // 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': 'walletpassphrase',
- 'password': Getwifkeys_passphrase,
- 'timeout': '2592000'
+ 'method': 'encryptwallet',
+ 'passphrase': Getwifkeys_passphrase
};
$.ajax({
type: 'POST',
- data: JSON.stringify(WalletPassphrase_ajax_data),
+ data: JSON.stringify(EncryptWallet_ajax_data),
url: 'http://127.0.0.1:' + config.iguanaPort,
success: function(data, textStatus, jqXHR) {
- var WalletPassphraseDataOutput = JSON.parse(data);
- console.log(WalletPassphraseDataOutput);
+ var EncryptWalletDataOutput = JSON.parse(data);
+
+ console.log(EncryptWalletDataOutput[wifkey_coin_handle + 'wif']);
+ WifKeyDivContent += '';
+ '' +
+ '' +
+ '' + wifkey_coin_handle + '' +
+ ' | ' +
+ '' + EncryptWalletDataOutput[wifkey_coin_handle] + ' | ' +
+ ' ' +
+ '' +
+ '' +
+ '' + wifkey_coin_handle + 'Wif' +
+ ' | ' +
+ '' + EncryptWalletDataOutput[wifkey_coin_handle + 'wif'] + ' | ' +
+ ' ' +
+ ' ';
+ $('#wif-priv-keys').html(WifKeyDivContent);
},
error: function(xhr, textStatus, error) {
console.log('failed getting Coin History.');
@@ -120,18 +92,48 @@ var WalletSettings = function() {
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);
+ });
+
+ //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);
+ }
+ });
});
}
});
@@ -165,8 +167,9 @@ var WalletSettings = function() {
submitHandler: function(form) {
var Getimport_wifkey = $('#import_wifkey').val();
// console.log(Getimport_wifkey);
- EDEXimportprivkey(Getimport_wifkey).then(function(result){
- console.log(result)
+ 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('');
@@ -207,6 +210,7 @@ $(document).ready(function() {
// 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);
@@ -218,10 +222,13 @@ function Settings_ShowWalletInfo() {
function Settings_ShowCoinPeers() {
console.log('waiting getpeers api to complete...');
- $('#coin_supernetpeers_h').text('');
- $('#coin_supernetpeers').text('');
- $('#coin_rawpeers_h').text('');
- $('#coin_rawpeers').text('');
+ $(
+ '#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 = {
@@ -241,6 +248,7 @@ function Settings_ShowCoinPeers() {
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 ) {
@@ -257,6 +265,7 @@ function Settings_ShowCoinPeers() {
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 ) {
@@ -284,7 +293,7 @@ function Settings_ShowCoinPeers() {
}
function Settings_AddCoinPeers() {
- console.log('wait till peer ip added to selected coin...')
+ 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'),
@@ -302,6 +311,7 @@ function Settings_AddCoinPeers() {
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);
|