mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-21 02:19:47 +00:00
coinexchange: check wallet status and disable if offline
This commit is contained in:
parent
dfb28223cc
commit
149e950f57
1 changed files with 11 additions and 0 deletions
|
@ -1271,6 +1271,17 @@ function updateCoinExchangeMarkets()
|
|||
continue;
|
||||
}
|
||||
|
||||
if($currency->Active && $coin->enable) {
|
||||
// check wallet status (deposit/withdrawals)
|
||||
$status = coinexchange_api_query('getcurrency', 'ticker_code='.$symbol);
|
||||
if(is_object($status) && is_object($status->result)) {
|
||||
$res = $status->result;
|
||||
if($market->disabled < 9) $market->disabled = (objSafeVal($res,'WalletStatus') == "offline");
|
||||
$market->message = $market->disabled ? $res->WalletStatus : '';
|
||||
//debuglog("$exchange: $symbol wallet is {$res->WalletStatus}");
|
||||
}
|
||||
}
|
||||
|
||||
$market->save();
|
||||
|
||||
if($market->disabled || $market->deleted) continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue