fix montzar bug

This commit is contained in:
2026-05-25 16:17:24 +03:30
parent b84ea8aabe
commit da9498cb51
2 changed files with 3 additions and 3 deletions
@@ -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));
+2 -2
View File
@@ -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)