From da9498cb515ed8f31e2c70dafeaa90898239823c Mon Sep 17 00:00:00 2001 From: adonis Date: Mon, 25 May 2026 16:17:24 +0330 Subject: [PATCH] fix montzar bug --- app/Http/Controllers/Site/ReportController.php | 2 +- app/Services/MontzarService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Site/ReportController.php b/app/Http/Controllers/Site/ReportController.php index c0b68b8..4289a87 100644 --- a/app/Http/Controllers/Site/ReportController.php +++ b/app/Http/Controllers/Site/ReportController.php @@ -238,7 +238,7 @@ class ReportController extends Controller $customPrice['price'] = ($buy + $sell) / 2; $customPrice['diff'] = ($buy - $sell) / 2; - $config->UpdateConfig('montzar_price', (float) $customPrice['price']); + $config->UpdateConfig('montzar_live_price', (float) $customPrice['price']); $config->UpdateConfig('montzar_diff', (float) $customPrice['diff']); $config->UpdateConfig('montzar_mazaneh', ((float) $customPrice['price'] * 4.331802)); diff --git a/app/Services/MontzarService.php b/app/Services/MontzarService.php index 69a74f5..e46446a 100644 --- a/app/Services/MontzarService.php +++ b/app/Services/MontzarService.php @@ -151,7 +151,7 @@ class MontzarService ? $this->config()->Config('montzar_truly_buy_mazaneh') : $this->config()->Config('montzar_truly_sell_mazaneh'); - $montzarPrice = (float) $this->config()->Config('montzar_price'); + $montzarPrice = (float) $this->config()->Config('montzar_live_price'); $cash = (int) round( $data['total_price'] ?? ($montzarPrice * (float) $data['amount']) @@ -359,7 +359,7 @@ class MontzarService private function syncOrderWithMontzarResponse(array &$data, array $parsed): void { $montzarDiff = (float) $this->config()->Config('montzar_diff'); - $montzarPrice = (float) $this->config()->Config('montzar_price'); + $montzarPrice = (float) $this->config()->Config('montzar_live_price'); $totalPriceMontzar = ((int) $data['direction'] === 1) ? ($montzarPrice + $montzarDiff)