Browse Source

Basilisk Mode Balance query conditioned to sue DEX listunspent

master
Satinder Grewal 8 years ago
parent
commit
b7193f99f3
  1. 23
      assets/scripts/dashboard.js

23
assets/scripts/dashboard.js

@ -279,6 +279,10 @@ var Dashboard = function() {
walletDivContent += '<!-- End Wallet Widget '+AllcoinsDataOutput[value][index]+' -->'; walletDivContent += '<!-- End Wallet Widget '+AllcoinsDataOutput[value][index]+' -->';
$('.wallet-widgets-row').html(walletDivContent); $('.wallet-widgets-row').html(walletDivContent);
if ( modecode == 'Basilisk' ) {
$('span[data-edexcoincode="' + AllcoinsDataOutput[value][index] + '"][id="edexcoin-balance"]').parent().hide();
//getBasiliskCoinBalance(AllcoinsDataOutput[value][index])
}
getCoinBalance(AllcoinsDataOutput[value][index]); getCoinBalance(AllcoinsDataOutput[value][index]);
$('.scrollbar-dynamic').scrollbar(); //Make sure widget-body has scrollbar for transactions history $('.scrollbar-dynamic').scrollbar(); //Make sure widget-body has scrollbar for transactions history
$('[data-toggle="tooltip"]').tooltip(); //Make sure tooltips are working for wallet widgets and anywhere else in wallet. $('[data-toggle="tooltip"]').tooltip(); //Make sure tooltips are working for wallet widgets and anywhere else in wallet.
@ -459,8 +463,15 @@ function edexCoinBtnAction() {
$('#edexcoin_active_addr').text(coinmainaddr[0]); $('#edexcoin_active_addr').text(coinmainaddr[0]);
//populate selected coin's balance //populate selected coin's balance
var coinwalletbalance = EDEXgetBalance(coincode); if ( selected_coinmode == 'Basilisk' ) {
$('#edex_total_balance').text(coinwalletbalance[0]); var coinwalletbalance = EDEX_DEXlistunspent(coincode, coinmainaddr[0]);
console.log(coinwalletbalance[0].amount)
coinwalletbalance = coinwalletbalance[0].amount
$('#edex_total_balance').text(coinwalletbalance);
} else {
var coinwalletbalance = EDEXgetBalance(coincode);
$('#edex_total_balance').text(coinwalletbalance[0]);
}
//getCoinBalance(active_edexcoin); //getCoinBalance(active_edexcoin);
EdexfillTxHistory(coincode); EdexfillTxHistory(coincode);
@ -689,6 +700,14 @@ function getCoinBalance(coin) {
}); });
} }
function getBasiliskCoinBalance(coin) {
var coinmainaddr = EDEXMainAddr(coin);
var coinwalletbalance = EDEX_DEXlistunspent(coin, coinmainaddr);
console.log(coinwalletbalance[0].amount)
coinwalletbalance = coinwalletbalance[0].amount
$('span[data-edexcoincode="' + coin + '"][id="edexcoin-balance"]').text(coinwalletbalance);
}
function StopShowCoinHistory() { function StopShowCoinHistory() {
clearInterval(ExecuteShowCoinHistory); clearInterval(ExecuteShowCoinHistory);
console.log('Stopped executing History and ProgressBar API.'); console.log('Stopped executing History and ProgressBar API.');

Loading…
Cancel
Save