fix(wallet,assets): fix 3 extra zeros in wallet rial value and handle closed market in asset calculations
This commit is contained in:
@@ -844,6 +844,9 @@ class ZaarboxPriceService
|
||||
|
||||
if ($copper !== null && $dollar !== null) {
|
||||
$cp = (int) round(($copper / 1000000) * $dollar);
|
||||
if ($cp > 500_000_000) {
|
||||
$cp = (int) round($cp / 1000);
|
||||
}
|
||||
$copperProducts = Product::where('metal_id', 3)->get();
|
||||
foreach ($copperProducts as $copperProduct) {
|
||||
ProductPriceService::syncFromReference($copperProduct, $cp, 0);
|
||||
|
||||
Reference in New Issue
Block a user