Browse Source

cleanup p2

master
pbca26 8 years ago
parent
commit
c607cd5648
  1. 12
      assets/scripts/dashboard/DashboardBasilisk.js
  2. 52
      assets/scripts/dashboard/DashboardCoinFiat.js
  3. 30
      assets/scripts/dashboard/DashboardDEX.js
  4. 278
      assets/scripts/dashboard/DashboardEDEX.js
  5. 2
      assets/scripts/iguana_api.js
  6. 16
      assets/scripts/iguana_api/IguanaAddcoin.js
  7. 18
      assets/scripts/iguana_api/IguanaDEX.js
  8. 2
      assets/scripts/kmd_wallet/KMDWalletDashboard.js
  9. 3
      assets/scripts/lang/en.js
  10. 1170
      assets/scripts/sidebar.js

12
assets/scripts/dashboard/DashboardBasilisk.js

@ -1,7 +1,8 @@
function ShowBasiliskFetchDataProgress(coin) {
var active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode');
Shepherd_GetBasiliskCache().then(function(result) {
Shepherd_GetBasiliskCache()
.then(function(result) {
var _data = JSON.parse(result),
query = _data.result.basilisk,
coin_exists = true,
@ -292,9 +293,12 @@ function SwitchBasicliskFull(switch_data) {
}
function getBasiliskCoinBalance(coin) {
EDEXMainAddr(coin).then(function(result){
console.log(result)
EDEX_DEXlistunspent(coin, result).then(function(result_listunspent) {
EDEXMainAddr(coin)
.then(function(result){
console.log(result);
EDEX_DEXlistunspent(coin, result)
.then(function(result_listunspent) {
console.log(result_listunspent[0].amount);
$('span[data-edexcoincode="' + coin + '"][id="edexcoin-balance"]').text(result_listunspent[0].amount);
});

52
assets/scripts/dashboard/DashboardCoinFiat.js

@ -1,13 +1,19 @@
function getCoinBalance(coin) {
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
EDEXlistunspent(active_edexcoin).then(function(result) {
EDEXlistunspent(active_edexcoin)
.then(function(result) {
console.log(result)
if (result[0] != undefined) {
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);
@ -15,11 +21,19 @@ function getCoinBalance(coin) {
}
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);
@ -142,11 +156,14 @@ function ShowCoinProgressBar(coin) {
coin_blocks_plus1 = coin_blocks + 1;
sessionStorage.setItem('Activate' + coin + 'History', 'Yes');
$('div[data-edexcoin="'+coin+'"][id="currency-progressbars"]').show();
$('div[data-edexcoin="'+coin+'"][id="currency-bundles"]').width(parseFloat(CoinInfoData.bundles).toFixed(2) + '%');
$('span[data-edexcoin="'+coin+'"][id="currency-bundles-percent"]').text('(' + coin + ') ' + parseFloat(CoinInfoData.bundles).toFixed(2) + '% - ( ' + coin_blocks_plus1 + ' / '+ CoinInfoData.longestchain + ' ) ==>> RT' + CoinInfoData.RTheight);
$('div[data-edexcoin="'+coin+'"][id="additional-progress-bars"]').hide();
$('div[data-edexcoin="'+coin+'"][id="currency-bundles"]').removeClass( 'progress-bar-info' ).addClass( 'progress-bar-indicating progress-bar-success' );
$('div[data-edexcoin="' + coin + '"][id="currency-progressbars"]').show();
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]').width(parseFloat(CoinInfoData.bundles).toFixed(2) + '%');
$('span[data-edexcoin="' + coin + '"][id="currency-bundles-percent"]')
.text('(' + coin + ') ' + parseFloat(CoinInfoData.bundles).toFixed(2) + '% - ( ' + coin_blocks_plus1 + ' / '+ CoinInfoData.longestchain + ' ) ==>> RT' + CoinInfoData.RTheight);
$('div[data-edexcoin="' + coin + '"][id="additional-progress-bars"]').hide();
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]')
.removeClass( 'progress-bar-info' )
.addClass( 'progress-bar-indicating progress-bar-success' );
$('#edex-footer').css('height', '11px');
resizeDashboardWindow();
$('#edexcoin-wallet-waitingrt-alert').hide();
@ -159,9 +176,12 @@ function ShowCoinProgressBar(coin) {
console.log(coin + ': ' + CoinInfoData.bundles);
$('div[data-edexcoin="' + coin + '"][id="additional-progress-bars"]').show();
$('div[data-edexcoin="' + coin + '"][id="currency-progressbars"]').show();
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]').removeClass( 'progress-bar-indicating progress-bar-success' ).addClass( 'progress-bar-info' );
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]')
.removeClass( 'progress-bar-indicating progress-bar-success' )
.addClass( 'progress-bar-info' );
$('div[data-edexcoin="' + coin + '"][id="currency-bundles"]').width(parseFloat(CoinInfoData.bundles).toFixed(2) + '%');
$('span[data-edexcoin="' + coin + '"][id="currency-bundles-percent"]').text('(' + coin + ') ' + parseFloat(CoinInfoData.bundles).toFixed(2) + '% - ( ' + coin_blocks_plus1 + ' / ' + CoinInfoData.longestchain + ' )');
$('span[data-edexcoin="' + coin + '"][id="currency-bundles-percent"]')
.text('(' + coin + ') ' + parseFloat(CoinInfoData.bundles).toFixed(2) + '% - ( ' + coin_blocks_plus1 + ' / ' + CoinInfoData.longestchain + ' )');
$('div[data-edexcoin="' + coin + '"][id="currency-utxo"]').width(parseFloat(CoinInfoData.utxo).toFixed(2) + '%');
$('span[data-edexcoin="' + coin + '"][id="currency-utxo-percent"]').text('(' + coin + ') ' + parseFloat(CoinInfoData.utxo).toFixed(2) + '%');
$('div[data-edexcoin="' + coin + '"][id="currency-balances"]').width(parseFloat(CoinInfoData.balances).toFixed(2) + '%');

30
assets/scripts/dashboard/DashboardDEX.js

@ -29,7 +29,8 @@ function getDEXGetBalance(coin) {
url: 'http://127.0.0.1:' + config.iguanaPort,
type: 'POST',
dataType: 'json'
}).then(data => {
})
.then(data => {
var total_balance = 0,
total_interest = 0;
@ -50,7 +51,8 @@ function getDEXGetBalance(coin) {
url: 'http://127.0.0.1:' + config.iguanaPort,
type: 'POST',
dataType: 'json'
}).then(data => {
})
.then(data => {
console.log(data);
total_balance = total_balance + data.balance;
@ -70,8 +72,9 @@ function getDEXGetBalance(coin) {
resolve(pass_data);
});
});
})).then(result => {
resolve(result[result.length-1]);
}))
.then(result => {
resolve(result[result.length - 1]);
NProgress.done();
});
});
@ -89,7 +92,8 @@ function getDEXGetBalance_cache(coin) {
NProgress.start();
return new Promise((resolve) => {
Shepherd_CheckBasiliskCacheData(coin).then(function(result) {
Shepherd_CheckBasiliskCacheData(coin)
.then(function(result) {
//console.log(result);
//console.log(result.coin);
@ -100,7 +104,8 @@ function getDEXGetBalance_cache(coin) {
'calls': 'listtransactions:getbalance:refresh'
};
//console.log(call_data)
Shepherd_FetchBasiliskData(call_data).then(function(result) {
Shepherd_FetchBasiliskData(call_data)
.then(function(result) {
console.log(result);
});
} else if (result.getbalance == false) {
@ -116,7 +121,8 @@ function getDEXGetBalance_cache(coin) {
}
})
Shepherd_GetBasiliskCache().then(function(result) {
Shepherd_GetBasiliskCache()
.then(function(result) {
var _data = JSON.parse(result),
query = _data.result.basilisk,
total_balance = 0,
@ -147,9 +153,10 @@ function getDEXGetBalance_cache(coin) {
pass_data = { 'total': 0.00000000 };
}
resolve(pass_data)
})
})).then(result => {
resolve(pass_data);
});
}))
.then(result => {
if ( result[result.length - 1].total == 0 ) {
resolve(result[result.length - 2]);
} else {
@ -255,7 +262,8 @@ function getDEXGetBalance2(coin) {
resolve(tmp_addr_total_balance_output)
NProgress.done();
}).fail(function(xhr, textStatus, error) {
})
.fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {

278
assets/scripts/dashboard/DashboardEDEX.js

@ -12,7 +12,8 @@ function EdexfillTxHistory(coin) {
var active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode');
if ( active_edexcoinmodecode === 'Basilisk' ) {
EdexGetTxList_cache(coin).then(function(result) {
EdexGetTxList_cache(coin)
.then(function(result) {
var edex_txhistory_table = '';
edex_txhistory_table = $('#edex-tx-history-tbl').DataTable({
data: result,
@ -38,7 +39,8 @@ function EdexfillTxHistory(coin) {
}
if ( active_edexcoinmodecode === 'Full' ) {
EdexGetTxList(coin).then(function(result){
EdexGetTxList(coin)
.then(function(result){
var edex_txhistory_table = '';
edex_txhistory_table = $('#edex-tx-history-tbl').DataTable({
data: result,
@ -265,19 +267,20 @@ function refreshEDEXCoinWalletList() {
break;
}
walletDivContent += '<!-- Wallet Widget ' + AllcoinsDataOutput[value][index] + ' -->';
walletDivContent += '<div class="list-group-item col-xlg-6 col-lg-12 wallet-widgets-info" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '">';
walletDivContent += '<div class="widget widget-shadow">';
walletDivContent += '<div class="widget-content text-center bg-white padding-20">';
walletDivContent += '<a class="avatar margin-bottom-5 edexcoin-logo" href="javascript:void(0)" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '" data-edexcoinmodecode="' + modecode + '" data-edexcoinname="' + coinname + '" id="edexcoin-logo">';
walletDivContent += '<img class="img-responsive" src="assets/images/cryptologo/' + coinlogo + '.png" alt="' + coinname + '"/>';
walletDivContent += '<span class="badge up badge-' + modecolor + '" id="basfull" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '" data-toggle="tooltip" data-placement="top" data-original-title="' + modetip + '">' + modecode + '</span>';
walletDivContent += '</a>';
walletDivContent += '<div class="coin-name">' + coinname + '</div>';
walletDivContent += '</div>';
walletDivContent += '</div>';
walletDivContent += '</div>';
walletDivContent += '<!-- End Wallet Widget ' + AllcoinsDataOutput[value][index] + ' -->';
walletDivContent +=
'<!-- Wallet Widget ' + AllcoinsDataOutput[value][index] + ' -->' +
'<div class="list-group-item col-xlg-6 col-lg-12 wallet-widgets-info" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '">' +
'<div class="widget widget-shadow">' +
'<div class="widget-content text-center bg-white padding-20">' +
'<a class="avatar margin-bottom-5 edexcoin-logo" href="javascript:void(0)" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '" data-edexcoinmodecode="' + modecode + '" data-edexcoinname="' + coinname + '" id="edexcoin-logo">' +
'<img class="img-responsive" src="assets/images/cryptologo/' + coinlogo + '.png" alt="' + coinname + '"/>' +
'<span class="badge up badge-' + modecolor + '" id="basfull" data-edexcoincode="' + AllcoinsDataOutput[value][index] + '" data-toggle="tooltip" data-placement="top" data-original-title="' + modetip + '">' + modecode + '</span>' +
'</a>' +
'<div class="coin-name">' + coinname + '</div>' +
'</div>' +
'</div>' +
'</div>' +
'<!-- End Wallet Widget ' + AllcoinsDataOutput[value][index] + ' -->';
$('.wallet-widgets-row').html(walletDivContent);
//getCoinBalance(AllcoinsDataOutput[value][index]);
@ -336,7 +339,8 @@ function EdexGetTxList(coin) {
url: 'http://127.0.0.1:' + config.iguanaPort,
type: 'POST',
dataType: 'json'
}).then(data => {
})
.then(data => {
var total_utxos = [];
let params = '';
@ -403,7 +407,8 @@ function EdexGetTxList(coin) {
resolve(total_utxos);
});
});
})).then(result => {
}))
.then(result => {
let result_data = result[result.length - 1];
let compiled_result = [];
@ -438,18 +443,18 @@ function EdexGetTxList(coin) {
var tmp_secondsToString = secondsToString(result_data[index].blocktime);
if ( result_data[index].category == 'send' ) {
tmp_category = '<i class="icon fa-arrow-circle-left"></i> OUT';
tmp_category = '<i class="icon fa-arrow-circle-left"></i> ' + _lang[defaultLang].DASHBOARD.OUT;
}
if ( result_data[index].category == 'receive' ) {
tmp_category = '<i class="icon fa-arrow-circle-right"></i> IN';
tmp_category = '<i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN;
}
if ( result_data[index].category == 'generate' ) {
tmp_category = '<i class="icon fa-cogs"></i> Mined';
tmp_category = '<i class="icon fa-cogs"></i> ' + _lang[defaultLang].DASHBOARD.IMMATURE;
}if ( result_data[index].category == 'immature' ) {
tmp_category = '<i class="icon fa-clock-o"></i> Immature';
tmp_category = '<i class="icon fa-clock-o"></i> ' + _lang[defaultLang].DASHBOARD.OUT;
}
if ( result_data[index].category == 'unknown' ) {
tmp_category = '<i class="icon fa-meh-o"></i> Unknown';
tmp_category = '<i class="icon fa-meh-o"></i> ' + _lang[defaultLang].DASHBOARD.UNKNOWN;
}
tmplisttransactions = [
@ -498,10 +503,14 @@ function EdexGetTxList(coin) {
var tmp_secondsToString = secondsToString(result_data[index].timestamp);
if ( result_data[index].type == 'sent' ) {
tmp_category = '<span class="label label-danger"><i class="icon fa-arrow-circle-left"></i> ' + _lang[defaultLang].DASHBOARD.OUT + '</span>';
tmp_category = '<span class="label label-danger">' +
'<i class="icon fa-arrow-circle-left"></i> ' + _lang[defaultLang].DASHBOARD.OUT +
'</span>';
}
if ( result_data[index].type == 'received' ) {
tmp_category = '<span class="label label-success"><i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN + '</span>';
tmp_category = '<span class="label label-success">' +
'<i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN +
'</span>';
}
if ( result_data[index].type == 'generate' ) {
tmp_category = '<i class="icon fa-cogs"></i> ' + _lang[defaultLang].DASHBOARD.MINED;
@ -552,8 +561,9 @@ function EdexGetTxList_cache(coin) {
NProgress.start();
return new Promise((resolve) => {
Shepherd_GetBasiliskCache().then(function(result) {
var _data = JSON.parse(result)
Shepherd_GetBasiliskCache()
.then(function(result) {
var _data = JSON.parse(result),
query = _data.result.basilisk,
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode'),
total_utxos = [];
@ -565,7 +575,8 @@ function EdexGetTxList_cache(coin) {
total_utxos = $.merge(total_utxos, data);
resolve(total_utxos);
});
})).then(result => {
}))
.then(result => {
let result_data = result[result.length - 1];
let compiled_result = [];
@ -590,10 +601,14 @@ function EdexGetTxList_cache(coin) {
var tmp_secondsToString = secondsToString(result_data[index].timestamp);
if ( result_data[index].type == 'sent' ) {
tmp_category = '<span class="label label-danger"><i class="icon fa-arrow-circle-left"></i> ' + _lang[defaultLang].DASHBOARD.OUT + '</span>';
tmp_category = '<span class="label label-danger">' +
'<i class="icon fa-arrow-circle-left"></i> ' + _lang[defaultLang].DASHBOARD.OUT +
'</span>';
}
if ( result_data[index].type == 'received' ) {
tmp_category = '<span class="label label-success"><i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN + '</span>';
tmp_category = '<span class="label label-success">' +
'<i class="icon fa-arrow-circle-right"></i> ' + _lang[defaultLang].DASHBOARD.IN +
'</span>';
}
if ( result_data[index].type == 'generate' ) {
tmp_category = '<i class="icon fa-cogs"></i> ' + _lang[defaultLang].DASHBOARD.MINED;
@ -855,7 +870,8 @@ function EdexListAllAddr(coin) {
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode');
if (active_edexcoinmodecode == 'Basilisk' && coin !== 'BTC' && coin !== 'SYS') {
EDEXgetaddrbyaccount_cache(coin).then(function(result) {
EDEXgetaddrbyaccount_cache(coin)
.then(function(result) {
console.log(result);
var only_reciving_addr_data = [];
@ -894,7 +910,8 @@ function EdexListAllAddr(coin) {
NProgress.done();
});
} else if (active_edexcoinmodecode == 'Basilisk' ) {
EDEXgetaddrbyaccount(coin).then(function(result){
EDEXgetaddrbyaccount(coin)
.then(function(result){
console.log(result);
var only_reciving_addr_data = [];
@ -935,7 +952,8 @@ function EdexListAllAddr(coin) {
}
if (active_edexcoinmodecode == 'Full') {
EDEXgetaddrbyaccount(coin).then(function(result) {
EDEXgetaddrbyaccount(coin)
.then(function(result) {
console.log(result);
var only_reciving_addr_data = [];
@ -980,28 +998,42 @@ function edexCoinBtnAction() {
$('.edexcoin-logo').click(function() {
$( '#edexcoin_send_coins_back_btn' ).trigger( 'click' );
$('#btn_edexcoin_dashboard').hide();
$('#btn_edexcoin_send').show();
$('#btn_edexcoin_recieve').show();
$(
'#btn_edexcoin_send,' +
'#btn_edexcoin_recieve'
)
.show();
var selected_coin = $(this).data('edexcoincode'),
selected_coinmode = $(this).data('edexcoinmodecode'),
selected_coinname = $(this).data('edexcoinname');
$('#edexcoin_getbalance_interest').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(selected_coin);
sessionStorage.setItem('edexTmpMode', selected_coinmode);
resizeDashboardWindow();
if ( selected_coinmode == 'Basilisk' ) {
$('#edex-footer').hide();
$('#btn_edexcoin_basilisk').show();
$('#edexcoin-wallet-waitingrt-alert').hide();
$('#btn_edexcoin_basilisk').show();
$(
'#edex-footer,' +
'#edexcoin-wallet-waitingrt-alert'
)
.hide();
sessionStorage.setItem('edexTmpRefresh', 'start');
}
if ( selected_coinmode == 'Full' ) {
@ -1010,15 +1042,21 @@ function edexCoinBtnAction() {
sessionStorage.setItem('edexTmpRefresh', 'start');
}
if ( selected_coinmode !== 'Native' ) {
$('#edexcoin_dashoard_section').show();
$('#header-dashboard').show();
$('#wallet-widgets').show();
$('#edexcoin_dashboardinfo').show();
$('#no_wallet_selected').hide();
$('#edexcoin_send').hide();
$('#edexcoin_recieve_section').hide();
$('#edexcoin_settings').hide();
$('#currency-progressbars').show();
$(
'#edexcoin_dashoard_section,' +
'#header-dashboard,' +
'#wallet-widgets,' +
'#edexcoin_dashboardinfo,' +
'#currency-progressbars'
)
.show();
$(
'#no_wallet_selected,' +
'#edexcoin_send,' +
'#edexcoin_recieve_section,' +
'#edexcoin_settings'
)
.hide();
// get selected coin's code and populate in easydex wallet widget's html elements
var coincode = $(this).data('edexcoincode');
@ -1034,13 +1072,14 @@ function edexCoinBtnAction() {
$('#edexcoin-active').text(selected_coinname);
$('#edex_total_balance_coincode').text(coincode);
// populate selected coin's address
EDEXMainAddr(selected_coin).then(function(result) {
EDEXMainAddr(selected_coin)
.then(function(result) {
$('#edexcoin_active_addr').text(result);
$('#edexcoin_active_addr_clipboard').attr('data-clipboard-text', result);
})
$('#edexcoin_active_addr_clipboard').click(function() {
alertify.success('Address Copied.');
alertify.success(_lang[defaultLang].DASHBOARD.ADDR_COPIED + '.');
});
var clipboard = new Clipboard('.clipboard-edexaddr');
@ -1080,11 +1119,17 @@ function edexCoinBtnAction() {
selected_coin !== 'CARB' &&
selected_coin !== 'ANC' &&
selected_coin !== 'FRK') {
getDEXGetBalance_cache(selected_coin).then(function(result) {
getDEXGetBalance_cache(selected_coin)
.then(function(result) {
if ( result.interest !== undefined && selected_coin == '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(selected_coin);
@ -1092,22 +1137,36 @@ function edexCoinBtnAction() {
}
if ( result.interest === undefined || selected_coin !== 'KMD') {
$('#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(selected_coin);
});
} else if (selected_coinmode == 'Basilisk') {
getDEXGetBalance2(selected_coin).then(function(result) {
getDEXGetBalance2(selected_coin)
.then(function(result) {
if ( result.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.interest);
$('#edex_total_balance_interest').text(result.totalbalance);
$('#edex_total_interest_coincode').text(selected_coin);
@ -1115,23 +1174,36 @@ function edexCoinBtnAction() {
}
if ( result.interest === undefined || selected_coin !== 'KMD') {
$('#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(selected_coin);
});
} else {
EDEXlistunspent(selected_coin).then(function(result) {
EDEXlistunspent(selected_coin)
.then(function(result) {
if (result[0] != undefined) {
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(selected_coin);
@ -1139,11 +1211,19 @@ function edexCoinBtnAction() {
}
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);
@ -1167,24 +1247,24 @@ function edexCoinBtnAction() {
sessionStorage.setItem('edexTmpRefresh', 'start');
$( '#nav-zcash-wallet' ).trigger( 'click' );
}
if ( selected_coin == 'SUPERNET'
|| selected_coin == 'REVS'
|| selected_coin == 'REVS'
|| selected_coin == 'DEX'
|| selected_coin == 'PANGEA'
|| selected_coin == 'JUMBLR'
|| selected_coin == 'BET'
|| selected_coin == 'CRYPTO'
|| selected_coin == 'HODL'
|| selected_coin == 'SHARK'
|| selected_coin == 'BOTS'
|| selected_coin == 'MGW'
|| selected_coin == 'MVP'
|| selected_coin == 'WIRELESS'
|| selected_coin == 'KV'
|| selected_coin == 'CEAL'
|| selected_coin == 'MESH'
|| selected_coin == 'USD' ) {
if ( selected_coin == 'SUPERNET' ||
selected_coin == 'REVS' ||
selected_coin == 'REVS' ||
selected_coin == 'DEX' ||
selected_coin == 'PANGEA' ||
selected_coin == 'JUMBLR' ||
selected_coin == 'BET' ||
selected_coin == 'CRYPTO' ||
selected_coin == 'HODL' ||
selected_coin == 'SHARK' ||
selected_coin == 'BOTS' ||
selected_coin == 'MGW' ||
selected_coin == 'MVP' ||
selected_coin == 'WIRELESS' ||
selected_coin == 'KV' ||
selected_coin == 'CEAL' ||
selected_coin == 'MESH' ||
selected_coin == 'USD' ) {
sessionStorage.setItem('edexTmpMode', selected_coinmode);
sessionStorage.setItem('edexTmpRefresh', 'start');
assetchain_pax_menu_actions(selected_coin)

2
assets/scripts/iguana_api.js

@ -133,7 +133,7 @@ function Iguana_HashHex(data) {
}
function Iguana_SetRPCAuth() {
var tmpPass = md5(PassPhraseGenerator.generatePassPhrase(128));
var tmpPass = 1234; // md5(PassPhraseGenerator.generatePassPhrase(128));
sessionStorage.setItem('IguanaRPCAuth', tmpPass);
}

16
assets/scripts/iguana_api/IguanaAddcoin.js

@ -337,9 +337,9 @@ function Iguana_addcoin(addcoin_data) {
var startcoin = function() {
return new Promise(function(resolve, reject) {
Shepherd_herd('komodod', {
'ac_name': 'komodod',
'ac_options': [
'-daemon=0',
'ac_name': 'komodod',
'ac_options': [
'-daemon=0',
'-addnode=78.47.196.146'
]
});
@ -386,10 +386,10 @@ function Iguana_addcoin(addcoin_data) {
var startcoin = function() {
return new Promise(function(resolve, reject) {
Shepherd_herd('zcashd', {
'ac_name': 'zcashd',
'ac_options': [
'-daemon=0',
'-server=1'
'ac_name': 'zcashd',
'ac_options': [
'-daemon=0',
'-server=1'
]
});
var result = 'startcoin: DONE';
@ -487,7 +487,7 @@ function Iguana_addcoin(addcoin_data) {
'ac_name': 'SUPERNET',
'ac_options': [
'-daemon=0',
'-server',
'-server',
'-ac_name=SUPERNET',
'-ac_supply=816061',
'-addnode=78.47.196.146'

18
assets/scripts/iguana_api/IguanaDEX.js

@ -196,8 +196,11 @@ function Iguana_DEXImportAll() {
});
ajax_call_1.done(function(data) {
$.each([ 'basilisk','full' ], function(data_index,data_value) {
$.each(data[data_value], function(mode_index,mode_value) {
$.each([
'basilisk',
'full'
], function(data_index, data_value) {
$.each(data[data_value], function(mode_index, mode_value) {
var ajax_data_2 = {
'userpass': tmpIguanaRPCAuth,
'coin': mode_value,
@ -256,7 +259,7 @@ function Iguana_DEXImportAll() {
});
ajax_call_5.done(function(data) {
console.log(mode_value)
console.log(mode_value);
console.log(data);
if (data == 'already in list') {
@ -391,7 +394,8 @@ function Iguana_DEXsendrawtx(data) {
url: 'http://127.0.0.1:' + config.iguanaPort,
type: 'POST',
//dataType: 'json'
}).then(result => {
})
.then(result => {
console.log(result);
resolve(result);
});
@ -427,7 +431,8 @@ function EDEX_DEXlistunspent(coin, addr) {
toastr.error('Less than required responses. Please try again.', 'Basilisk Notification');
}
resolve(AjaxOutputData);
}).fail(function(xhr, textStatus, error) {
})
.fail(function(xhr, textStatus, error) {
// handle request failures
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
@ -523,7 +528,8 @@ function EDEX_DEXgetinfoAll() {
var tmp_index = parseInt(coin_index) + 1,
refresh_percent = parseFloat(parseInt(coin_index, 10) * 100) / parseInt(get_dex_notarychains.length, 10);
console.log(refresh_percent)
console.log(refresh_percent);
$('#basilisk-connections-refresh-title').text('Connection status... ' + tmp_index + '/' + get_dex_notarychains.length + ': ' + coin_value);
$('#basilisk-connections-refresh-percent').text(refresh_percent + '%');
$('#basilisk-connections-refresh-progress-bar').width(refresh_percent + '%');

2
assets/scripts/kmd_wallet/KMDWalletDashboard.js

@ -113,7 +113,7 @@ var KMDWalletDashboard = function() {
$('#kmd_wallet_total_value').text(total_minus_currency_fee.toFixed(8));
if ($('#kmd_wallet_send_from').val() != '- Select Transparent or Private KMD Address -' &&
if ($('#kmd_wallet_send_from').val() != '- ' + _lang[defaultLang].KMD_NATIVE.SELECT_ADDRESS_ALT + ' -' &&
$('#kmd_wallet_amount').val() != '' &&
$('#kmd_wallet_sendto') != '' &&
$('#kmd_wallet_fee') != '' ) {

3
assets/scripts/lang/en.js

@ -247,7 +247,8 @@ const _lang = {
'OUT': 'OUT',
'MINED': 'Mined',
'IMMATURE': 'Immature',
'ZADDR_NOT_LISTED': 'Z Address not listed by wallet'
'ZADDR_NOT_LISTED': 'Z Address not listed by wallet',
'ADDR_COPIED': 'Address Copied'
},
'TOASTR': {
'WALLET_NOTIFICATION': 'Wallet Notification',

1170
assets/scripts/sidebar.js

File diff suppressed because it is too large
Loading…
Cancel
Save