Update paymentProcessor.js

Fixes Issue
round.confirmations = parseInt((tx.result.confirmations || 0));
^
TypeError: Cannot read property 'confirmations' of null
This commit is contained in:
hellcatz 2018-01-06 13:35:22 -08:00 committed by GitHub
parent ff0e1f6f32
commit 0dd13bec9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -735,7 +735,9 @@ function SetupForPool(logger, poolOptions, setupFinished){
}
var round = rounds[i];
// update confirmations for round
round.confirmations = parseInt((tx.result.confirmations || 0));
if (tx && tx.result)
round.confirmations = parseInt((tx.result.confirmations || 0));
// look for transaction errors
if (tx.error && tx.error.code === -5){
logger.warning(logSystem, logComponent, 'Daemon reports invalid transaction: ' + round.txHash);