|
@@ -4,6 +4,7 @@ namespace App\Listeners;
|
4
|
4
|
|
5
|
5
|
use App\Contracts\CurrencyHandler;
|
6
|
6
|
use App\Events\DefaultCurrencyChanged;
|
|
7
|
+use App\Facades\Forex;
|
7
|
8
|
use App\Models\Setting\Currency;
|
8
|
9
|
use Illuminate\Support\Facades\DB;
|
9
|
10
|
|
|
@@ -29,7 +30,9 @@ readonly class UpdateCurrencyRates
|
29
|
30
|
$defaultCurrency->update(['rate' => 1]);
|
30
|
31
|
}
|
31
|
32
|
|
32
|
|
- $this->updateOtherCurrencyRates($defaultCurrency);
|
|
33
|
+ if (Forex::isEnabled()) {
|
|
34
|
+ $this->updateOtherCurrencyRates($defaultCurrency);
|
|
35
|
+ }
|
33
|
36
|
});
|
34
|
37
|
}
|
35
|
38
|
|