Fix non-integer tBalance issue #15

This commit is contained in:
Joshua Yabut 2016-11-29 23:08:07 -05:00 committed by GitHub
parent 8b0bcc8aa2
commit 156478acb7
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
else {
var tBalance = 0;
for (var i = 0, len = result[0].response.length; i < len; i++) {
tBalance = tBalance + (result[0].response[i].amount * 100000000);
tBalance = Number(tBalance + (result[0].response[i].amount * 100000000)).toFixed(0);
}
logger.debug(logSystem, logComponent, addr + ' contains a balance of: ' + (tBalance / magnitude));
callback(null, tBalance);