fix montzar bug
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user