[FIX] min payout fix, balance not initialized
This commit is contained in:
parent
f72cdf3842
commit
7a86b827d5
@ -94,15 +94,15 @@ if ($user->isAuthenticated()) {
|
|||||||
} else {
|
} else {
|
||||||
switch (@$_POST['do']) {
|
switch (@$_POST['do']) {
|
||||||
case 'cashOut':
|
case 'cashOut':
|
||||||
|
$aBalance = $transaction->getBalance($_SESSION['USERDATA']['id']);
|
||||||
|
$dBalance = $aBalance['confirmed'];
|
||||||
if ($setting->getValue('disable_payouts') == 1 || $setting->getValue('disable_manual_payouts') == 1) {
|
if ($setting->getValue('disable_payouts') == 1 || $setting->getValue('disable_manual_payouts') == 1) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Manual payouts are disabled.', 'TYPE' => 'info');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Manual payouts are disabled.', 'TYPE' => 'info');
|
||||||
} else if ($aBalance['confirmed'] < $config['mp_threshold']) {
|
} else if ($dBalance < $config['mp_threshold']) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Payout must be greater or equal than ' . $config['mp_threshold'] . '.', 'TYPE' => 'info');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Payout must be greater or equal than ' . $config['mp_threshold'] . '.', 'TYPE' => 'info');
|
||||||
} else if (!$user->getCoinAddress($_SESSION['USERDATA']['id'])) {
|
} else if (!$user->getCoinAddress($_SESSION['USERDATA']['id'])) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'You have no payout address set.', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'You have no payout address set.', 'TYPE' => 'errormsg');
|
||||||
} else {
|
} else {
|
||||||
$aBalance = $transaction->getBalance($_SESSION['USERDATA']['id']);
|
|
||||||
$dBalance = $aBalance['confirmed'];
|
|
||||||
$user->log->log("info", $_SESSION['USERDATA']['username']." requesting manual payout");
|
$user->log->log("info", $_SESSION['USERDATA']['username']." requesting manual payout");
|
||||||
if ($dBalance > $config['txfee_manual']) {
|
if ($dBalance > $config['txfee_manual']) {
|
||||||
if (!$oPayout->isPayoutActive($_SESSION['USERDATA']['id'])) {
|
if (!$oPayout->isPayoutActive($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user