From 0dd13bec9de60f1712d2d645beb07a020b8b417f Mon Sep 17 00:00:00 2001 From: hellcatz Date: Sat, 6 Jan 2018 13:35:22 -0800 Subject: [PATCH] Update paymentProcessor.js Fixes Issue round.confirmations = parseInt((tx.result.confirmations || 0)); ^ TypeError: Cannot read property 'confirmations' of null --- libs/paymentProcessor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/paymentProcessor.js b/libs/paymentProcessor.js index e7b67b4..1ba7e44 100644 --- a/libs/paymentProcessor.js +++ b/libs/paymentProcessor.js @@ -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);