mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-30 23:30:38 +00:00
renting: add a server constant for withdraw tx fees
This commit is contained in:
parent
bd64837278
commit
e2d8fa818a
4 changed files with 6 additions and 4 deletions
|
@ -18,6 +18,7 @@ define('YAAMP_LIMIT_ESTIMATE', false);
|
|||
define('YAAMP_FEES_MINING', 0.5);
|
||||
define('YAAMP_FEES_EXCHANGE', 2);
|
||||
define('YAAMP_FEES_RENTING', 2);
|
||||
define('YAAMP_TXFEE_RENTING_WD', 0.002);
|
||||
define('YAAMP_PAYMENTS_FREQ', 3*60*60);
|
||||
define('YAAMP_PAYMENTS_MINI', 0.001);
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ function BackendUpdateDeposit()
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$fees = 0.0001;
|
||||
$fees = YAAMP_TXFEE_RENTING_WD; // 0.002
|
||||
|
||||
$list = getdbolist('db_rentertxs', "type='withdraw' and tx='scheduled'");
|
||||
foreach($list as $tx)
|
||||
|
|
|
@ -19,6 +19,7 @@ if (!defined('YIIMP_KWH_USD_PRICE')) define('YIIMP_KWH_USD_PRICE', 0.25);
|
|||
if (!defined('YAAMP_FEES_MINING')) define('YAAMP_FEES_MINING', 0.5);
|
||||
if (!defined('YAAMP_FEES_EXCHANGE')) define('YAAMP_FEES_EXCHANGE', 2);
|
||||
if (!defined('YAAMP_FEES_RENTING')) define('YAAMP_FEES_RENTING', 2);
|
||||
if (!defined('YAAMP_TXFEE_RENTING_WD')) define('YAAMP_TXFEE_RENTING_WD', 0.002);
|
||||
if (!defined('YAAMP_PAYMENTS_FREQ')) define('YAAMP_PAYMENTS_FREQ', 24*60*60);
|
||||
if (!defined('YAAMP_PAYMENTS_MINI')) define('YAAMP_PAYMENTS_MINI', 0.001);
|
||||
|
||||
|
|
|
@ -410,7 +410,7 @@ end;
|
|||
|
||||
public function actionWithdraw()
|
||||
{
|
||||
$fees = 0.0001;
|
||||
$fees = YAAMP_TXFEE_RENTING_WD; // 0.002
|
||||
|
||||
$deposit = user()->getState('yaamp-deposit');
|
||||
if(!$deposit)
|
||||
|
@ -430,9 +430,9 @@ end;
|
|||
$address = getparam('withdraw_address');
|
||||
|
||||
$amount = floatval(bitcoinvaluetoa(min($amount, $renter->balance-$fees)));
|
||||
if($amount < 0.001)
|
||||
if($amount < YAAMP_PAYMENTS_MINI) // 0.001
|
||||
{
|
||||
user()->setFlash('error', 'Minimum withdraw is 0.001');
|
||||
user()->setFlash('error', 'Minimum withdraw is '.YAAMP_PAYMENTS_MINI);
|
||||
$this->redirect("/renting");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue