fix some issu

This commit is contained in:
2026-08-26 21:47:09 +03:30
parent 74cc50149f
commit 40b185187c
14 changed files with 179 additions and 72 deletions
+8 -11
View File
@@ -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()]);
}
}