From a45142f6d701c77073177f13dbc56994357e551d Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 18 Feb 2024 05:15:10 +0200 Subject: [PATCH] fix pool balance condition --- src/Controller/CrontabController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/CrontabController.php b/src/Controller/CrontabController.php index 9c660ab..3dd0904 100644 --- a/src/Controller/CrontabController.php +++ b/src/Controller/CrontabController.php @@ -61,10 +61,10 @@ class CrontabController extends AbstractController // Payment received, send to blockchain if ($client->getReceivedByAddress($pool->getAddress(), $this->getParameter('app.pool.confirmations')) >= $pool->getCost()) { - // Check physical wallet balance - if ($client->getBalance($this->getParameter('app.kevacoin.pool.account')) <= $pool->getCost()) + // Check physical account balance + if ($client->getBalance($this->getParameter('app.kevacoin.pool.account'), $this->getParameter('app.pool.confirmations')) < $pool->getCost()) { - break; // @TODO exception + continue; // wait for income full confirmed amount } // Is room request