Browse Source

full mode komodo balances are not calculate interest in total balance

master
Satinder Grewal 8 years ago
parent
commit
853111638a
  1. 10
      assets/scripts/dashboard.js
  2. 7
      assets/scripts/iguana_api.js

10
assets/scripts/dashboard.js

@ -33,8 +33,8 @@ var Dashboard = function() {
$('#btn_edexcoin_dashboard').click(function() {
var active_edexcoin = $('[data-edexcoin]').attr("data-edexcoin");
console.log('EasyDEX dashbaord button clicked...');
console.log($(this).data());
//console.log('EasyDEX dashbaord button clicked...');
//console.log($(this).data());
if ( sessionStorage.getItem('edexTmpMode') === "Full") {
sessionStorage.setItem('edexTmpRefresh', "start");
}
@ -892,7 +892,13 @@ function getDEXCoinBalance(coin) {
var tmpcalcnum = 0;
$.each(AjaxOutputData, function(index) {
if ( AjaxOutputData[index].interest !== undefined ) {
//console.log('interest is available for this currency. Adding to total balance.');
tmpcalcnum = tmpcalcnum + AjaxOutputData[index].amount + AjaxOutputData[index].interest;
}
if ( AjaxOutputData[index].interest === undefined ) {
tmpcalcnum = tmpcalcnum + AjaxOutputData[index].amount;
}
});
var tmp_addr_total_balance_output = {"addr": coinmainaddr[0], "total": tmpcalcnum.toFixed(8)};

7
assets/scripts/iguana_api.js

@ -539,7 +539,12 @@ function EDEXlistunspent(coin) {
var tmpcalcnum = 0;
$.each(unique_addr_tmp_array, function(index, value) {
//console.log(value.amount);
tmpcalcnum = tmpcalcnum + value.amount;
if ( value.interest !== undefined ) {
tmpcalcnum = tmpcalcnum + value.amount + value.interest;
}
if ( value.interest === undefined ) {
tmpcalcnum = tmpcalcnum + value.amount;
}
});
//console.log(tmpcalcnum);
var tmp_addr_total_balance_output = {"addr": unique_addr_tmp_array[0].address, "total": tmpcalcnum};

Loading…
Cancel
Save