fix some issu
This commit is contained in:
@@ -327,19 +327,19 @@ class ReportController extends Controller
|
||||
|
||||
$config->UpdateConfig('montzar_closed', 'false');
|
||||
} catch (\Throwable $e) {
|
||||
$montzarLivePrice = 0;
|
||||
|
||||
\Log::error('MONZAR PRICE ERROR', [
|
||||
'message' => $e->getMessage(),
|
||||
'montzar_product_id' => $montzarProductId ?? null,
|
||||
'montzar_response' => $montzar ?? null,
|
||||
]);
|
||||
|
||||
// قطع لحظهای همکار → قیمت ذخیرهشده را نگه دار و دوباره در تیک بعدی تلاش کن
|
||||
$config->applyMontzarSyncFailure();
|
||||
if (!$config->getBool('montzar_closed', true)) {
|
||||
$stale = $config->getInt('montzar_live_price', 0);
|
||||
$montzarLivePrice = $config->isPlausibleQuotePrice((float) $stale) ? $stale : 0;
|
||||
}
|
||||
$stale = $config->getInt('montzar_live_price', 0);
|
||||
$montzarLivePrice = $config->isPlausibleQuotePrice((float) $stale) ? $stale : 0;
|
||||
$montzarFlags = $config->montzarOpenFlags();
|
||||
$montzar_open_buy = $montzarFlags['open_buy'];
|
||||
$montzar_open_sell = $montzarFlags['open_sell'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,12 +584,9 @@ class ReportController extends Controller
|
||||
|
||||
$config->UpdateConfig('montzar_closed', 'false');
|
||||
} catch (\Throwable $e) {
|
||||
$montzar = 0;
|
||||
$config->applyMontzarSyncFailure();
|
||||
if (!$config->getBool('montzar_closed', true)) {
|
||||
$stale = $config->getInt('montzar_live_price', 0);
|
||||
$montzar = $config->isPlausibleQuotePrice((float) $stale) ? $stale : 0;
|
||||
}
|
||||
$stale = $config->getInt('montzar_live_price', 0);
|
||||
$montzar = $config->isPlausibleQuotePrice((float) $stale) ? $stale : 0;
|
||||
\Log::error('STORE MONZAR PRICE ERROR', ['message' => $e->getMessage()]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user