Update liquid_payout.php
formatting
This commit is contained in:
parent
be77b05b12
commit
75f35d80b1
@ -8,21 +8,22 @@ require_once('shared.inc.php');
|
|||||||
|
|
||||||
// Check For RPC Connection
|
// Check For RPC Connection
|
||||||
if ($bitcoin->can_connect() === true){
|
if ($bitcoin->can_connect() === true){
|
||||||
$dBalance = $bitcoin->getbalance();
|
$dBalance = $bitcoin->getbalance();
|
||||||
// Check Wallet Balance
|
// Check Wallet Balance
|
||||||
$log->logDebug("The Wallet Balance is " .$dBalance. "\n");
|
$log->logDebug("The Wallet Balance is " .$dBalance. "\n");
|
||||||
$dGetInfo = $bitcoin->getinfo();
|
$dGetInfo = $bitcoin->getinfo();
|
||||||
|
|
||||||
// Check for POS Mint
|
// Check for POS Mint
|
||||||
if (is_array($dGetInfo) && array_key_exists('newmint', $dGetInfo)) {
|
|
||||||
$dNewmint = $dGetInfo['newmint'];
|
if (is_array($dGetInfo) && array_key_exists('newmint', $dGetInfo)) {
|
||||||
|
$dNewmint = $dGetInfo['newmint'];
|
||||||
$log->logDebug("Current Mint is: " .$dNewmint);
|
$log->logDebug("Current Mint is: " .$dNewmint);
|
||||||
} else {
|
} else {
|
||||||
$dNewmint = -1;
|
$dNewmint = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
else {
|
||||||
$dBalance = 0;
|
$dBalance = 0;
|
||||||
$dNewmint = -1;
|
$dNewmint = -1;
|
||||||
$log->logError('Unable to connect to wallet RPC service');
|
$log->logError('Unable to connect to wallet RPC service');
|
||||||
}
|
}
|
||||||
@ -43,15 +44,15 @@ $send = $dBalance - $dFloat ;
|
|||||||
$log->logInfo("Final Sending Amount is : " .$send. "\n");
|
$log->logInfo("Final Sending Amount is : " .$send. "\n");
|
||||||
|
|
||||||
if($send > $dThreshold){
|
if($send > $dThreshold){
|
||||||
if($sendAddress !== ''){
|
if($sendAddress !== ''){
|
||||||
$bitcoin->sendtoaddress($sendAddress, $send);
|
$bitcoin->sendtoaddress($sendAddress, $send);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$log->logInfo("No wallet address set\n");
|
$log->logInfo("No wallet address set\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$log->logInfo("Final Sending Amount Not Exceed threshold : " .$send. "\n");
|
$log->logInfo("Final Sending Amount Not Exceed threshold : " .$send. "\n");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user