From 75f35d80b143d535d74fdcb9eacbcd0534224907 Mon Sep 17 00:00:00 2001 From: myrinx Date: Fri, 10 Jan 2014 12:18:28 +0100 Subject: [PATCH] Update liquid_payout.php formatting --- cronjobs/liquid_payout.php | 45 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/cronjobs/liquid_payout.php b/cronjobs/liquid_payout.php index f357c766..7c088f26 100644 --- a/cronjobs/liquid_payout.php +++ b/cronjobs/liquid_payout.php @@ -8,21 +8,22 @@ require_once('shared.inc.php'); // Check For RPC Connection if ($bitcoin->can_connect() === true){ -$dBalance = $bitcoin->getbalance(); -// Check Wallet Balance -$log->logDebug("The Wallet Balance is " .$dBalance. "\n"); -$dGetInfo = $bitcoin->getinfo(); + $dBalance = $bitcoin->getbalance(); + // Check Wallet Balance + $log->logDebug("The Wallet Balance is " .$dBalance. "\n"); + $dGetInfo = $bitcoin->getinfo(); -// Check for POS Mint -if (is_array($dGetInfo) && array_key_exists('newmint', $dGetInfo)) { -$dNewmint = $dGetInfo['newmint']; - -$log->logDebug("Current Mint is: " .$dNewmint); -} else { - $dNewmint = -1; + // Check for POS Mint + + if (is_array($dGetInfo) && array_key_exists('newmint', $dGetInfo)) { + $dNewmint = $dGetInfo['newmint']; + $log->logDebug("Current Mint is: " .$dNewmint); + } else { + $dNewmint = -1; + } } -} else { - $dBalance = 0; +else { + $dBalance = 0; $dNewmint = -1; $log->logError('Unable to connect to wallet RPC service'); } @@ -43,15 +44,15 @@ $send = $dBalance - $dFloat ; $log->logInfo("Final Sending Amount is : " .$send. "\n"); if($send > $dThreshold){ - if($sendAddress !== ''){ - $bitcoin->sendtoaddress($sendAddress, $send); - } - else { - $log->logInfo("No wallet address set\n"); - } -} -else{ - $log->logInfo("Final Sending Amount Not Exceed threshold : " .$send. "\n"); + if($sendAddress !== ''){ + $bitcoin->sendtoaddress($sendAddress, $send); + } + else { + $log->logInfo("No wallet address set\n"); + } +} +else { + $log->logInfo("Final Sending Amount Not Exceed threshold : " .$send. "\n"); } ?>