diff --git a/cronjobs/liquid_payout.php b/cronjobs/liquid_payout.php deleted file mode 100755 index a0c9be13..00000000 --- a/cronjobs/liquid_payout.php +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/php -logFatal('Missing config option: coldwallet'); - $monitoring->endCronjob($cron_name, 'E0075', 1, true); -} - -// Check RPC connection -if ($bitcoin->can_connect() !== true) { - $log->logFatal('Unable to connect to RPC server, exiting'); - $monitoring->endCronjob($cron_name, 'E0006', 1, true); -} else { - // Check Wallet Balance - $dBalance = $bitcoin->getbalance(); - $log->logDebug('The wallet balance is: ' .$dBalance); - - // Do we have anything available at all? - if (! ($dBalance > 0)) { - $log->logInfo('No coins available in wallet'); - $monitoring->endCronjob($cron_name, 'E0076', 0, true, false); - } - - // Check for POS Mint - $dGetInfo = $bitcoin->getinfo(); - if (is_array($dGetInfo) && array_key_exists('newmint', $dGetInfo)) { - $dNewmint = $dGetInfo['newmint']; - $log->logDebug('Current Mint is: ' . $dNewmint); - } else { - $dNewmint = -1; - } -} - -// Fetch locked balance from transactions -$dLockedBalance = $transaction->getLockedBalance(); -$log->logDebug('The locked wallet balance for users is: ' . $dLockedBalance); - -// Fetch Final Wallet Balance after Transfer -$dFloat = $dLockedBalance + $config['coldwallet']['reserve']; -$dThreshold = $config['coldwallet']['threshold']; -$log->logDebug('The locked wallet balance + reserves amounts to: ' . $dFloat); - -// Send Liquid Balance -$sendAddress = $config['coldwallet']['address']; -$send = $dBalance - $dFloat ; -$log->logDebug('Final Sending Amount is : ' . $send); - -if($send > $dThreshold) { - if (!empty($sendAddress)) { - try { - $bitcoin->sendtoaddress($sendAddress, $send); - } catch (Exception $e) { - $log->logFatal('Failed to send coins to address, skipping liquid assets payout:' . $e->getMessage()); - $monitoring->endCronjob($cron_name, 'E0077', 1, true); - } - $log->logInfo('Sent out ' . $send . ' liquid assets'); - } else { - $log->logDebug('No wallet address set'); - } -} else { - $log->logDebug('Final sending amount not exceeding threshold: ' . $send); -} - -// Cron cleanup and monitoring -require_once('cron_end.inc.php'); -?> diff --git a/public/include/config/global.inc.dist.php b/public/include/config/global.inc.dist.php index fb7e22e2..900ca7de 100644 --- a/public/include/config/global.inc.dist.php +++ b/public/include/config/global.inc.dist.php @@ -50,15 +50,6 @@ $config['wallet']['host'] = 'localhost:19334'; $config['wallet']['username'] = 'testnet'; $config['wallet']['password'] = 'testnet'; -/** - * Cold Wallet / Liquid Assets - * Automatically send liquid assets to a cold wallet - * https://github.com/MPOS/php-mpos/wiki/Config-Setup#wiki-liquid-assets--cold-wallet - **/ -$config['coldwallet']['address'] = ''; -$config['coldwallet']['reserve'] = 50; -$config['coldwallet']['threshold'] = 5; - /** * Getting Started Config * Shown to users in the 'Getting Started' section