Fix overflowing

This commit is contained in:
Procrastinator 2016-12-11 19:34:15 -05:00 committed by GitHub
parent 5eb8f75d20
commit 3480c5d0c6
1 changed files with 1 additions and 1 deletions

View File

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