diff --git a/public/include/config/global.inc.dist.php b/public/include/config/global.inc.dist.php index 934df25d..e8d12774 100644 --- a/public/include/config/global.inc.dist.php +++ b/public/include/config/global.inc.dist.php @@ -35,6 +35,7 @@ $config = array( 'email' => 'test@example.com', // Mail address used for notifications ), 'currency' => 'LTC', // Currency name to be used on website + 'txfee' => 0.1, // Default tx fee added by RPC server 'block_bonus' => 0, 'payout_system' => 'prop', // Set your payout here so template changes are activated 'archive_shares' => true, // Store accounted shares in archive table? diff --git a/public/include/pages/account/edit.inc.php b/public/include/pages/account/edit.inc.php index 968ecfbe..6726b7d9 100644 --- a/public/include/pages/account/edit.inc.php +++ b/public/include/pages/account/edit.inc.php @@ -21,8 +21,8 @@ if ( ! $user->checkPin($_SESSION['USERDATA']['id'], $_POST['authPin']) && $_POST $aBalance = $transaction->getBalance($_SESSION['USERDATA']['id']); $dBalance = $aBalance['confirmed']; $sCoinAddress = $user->getCoinAddress($_SESSION['USERDATA']['id']); - // Ensure we can cover the potential transaction fee of 0.1 with the balance - if ($dBalance > 0.1) { + // Ensure we can cover the potential transaction fee + if ($dBalance > $config['txfee']) { if ($bitcoin->can_connect() === true) { try { $bitcoin->validateaddress($sCoinAddress); @@ -31,7 +31,7 @@ if ( ! $user->checkPin($_SESSION['USERDATA']['id'], $_POST['authPin']) && $_POST $continue = false; } if ($continue == true) { - // Send balance to address, mind 0.1 fee for transaction! + // Send balance to address, mind fee for transaction! try { if ($setting->getValue('auto_payout_active') == 0) { $bitcoin->sendtoaddress($sCoinAddress, $dBalance); @@ -56,7 +56,7 @@ if ( ! $user->checkPin($_SESSION['USERDATA']['id'], $_POST['authPin']) && $_POST $_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to litecoind RPC service', 'TYPE' => 'errormsg'); } } else { - $_SESSION['POPUP'][] = array('CONTENT' => 'Insufficient funds, you need more than 0.1 ' . $conifg['currency'] . ' to cover transaction fees', 'TYPE' => 'errormsg'); + $_SESSION['POPUP'][] = array('CONTENT' => 'Insufficient funds, you need more than ' . $config['txfee'] . ' ' . $conifg['currency'] . ' to cover transaction fees', 'TYPE' => 'errormsg'); } $setting->setValue('manual_payout_active', 0); } diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index 950f1db6..8ec1e882 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -35,6 +35,7 @@ $aGlobal = array( 'chaininfo' => $config['chaininfo'], 'config' => array( 'currency' => $config['currency'], + 'txfee' => $config['txfee'], 'payout_system' => $config['payout_system'], 'ap_threshold' => array( 'min' => $config['ap_threshold']['min'], diff --git a/public/templates/mmcFE/account/edit/default.tpl b/public/templates/mmcFE/account/edit/default.tpl index e5c31eab..f48ef67f 100644 --- a/public/templates/mmcFE/account/edit/default.tpl +++ b/public/templates/mmcFE/account/edit/default.tpl @@ -17,7 +17,7 @@ {include file="global/block_footer.tpl"} {include file="global/block_header.tpl" BLOCK_HEADER="Cash Out"} -