Merge pull request #31 from joshuayabut/#31,-learngitnow

Update paymentProcessor.js
This commit is contained in:
Procrastinator 2016-12-12 07:34:15 -05:00 committed by GitHub
commit c2a57fb8de
1 changed files with 3 additions and 3 deletions

View File

@ -164,7 +164,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
else { else {
var tBalance = 0; var tBalance = 0;
for (var i = 0, len = result[0].response.length; i < len; i++) { 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)); logger.debug(logSystem, logComponent, addr + ' contains a balance of: ' + (tBalance / magnitude));
callback(null, tBalance); callback(null, tBalance);
@ -509,7 +509,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
return; return;
} }
daemon.cmd('sendmany', [addressAccount || '', addressAmounts], function (result) { daemon.cmd('sendmany', [addressAccount, addressAmounts], function (result) {
//Check if payments failed because wallet doesn't have enough coins to pay for tx fees //Check if payments failed because wallet doesn't have enough coins to pay for tx fees
if (result.error && result.error.code === -6) { if (result.error && result.error.code === -6) {
var higherPercent = withholdPercent + 0.01; var higherPercent = withholdPercent + 0.01;
@ -588,7 +588,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
return; return;
case 'generate': case 'generate':
movePendingCommands.push(['smove', coin + ':blocksPending', coin + ':blocksConfirmed', r.serialized]); movePendingCommands.push(['smove', coin + ':blocksPending', coin + ':blocksConfirmed', r.serialized]);
roundsToDelete.push(coin + ':shares:round' + r.height); //roundsToDelete.push(coin + ':shares:round' + r.height);
return; return;
} }