Update stats.js

This commit is contained in:
hellcatz 2017-05-13 15:50:42 -07:00 committed by GitHub
parent 6edd190842
commit ee27470e7a
1 changed files with 3 additions and 3 deletions

View File

@ -260,11 +260,11 @@ module.exports = function(logger, portalConfig, poolConfigs){
balName = String(bals[1][b]);
} else if (balName == workerName) {
balAmount = parseFloat(bals[1][b]);
totalHeld = balanceRound(totalHeld+balAmount);
}
}
paidAmount = parseFloat(pays[1][i]);
totalPaid = balanceRound(totalPaid+paidAmount);
totalHeld += balAmount;
totalPaid += paidAmount;
balances.push({
worker:String(workerName),
balance:balanceRound(balAmount),
@ -285,7 +285,7 @@ module.exports = function(logger, portalConfig, poolConfigs){
_this.stats.balances = balances;
_this.stats.address = address;
cback({totalHeld:totalHeld, totalPaid:totalPaid, balances});
cback({totalHeld:balanceRound(totalHeld), totalPaid:balanceRound(totalPaid), balances});
});
};