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)