cyxc
All checks were successful
Deploy / deploy-staging (push) Successful in 8s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-05 20:36:41 +02:00
parent fd092ef615
commit eb8b04a621
14 changed files with 39 additions and 969 deletions

View File

@@ -310,13 +310,6 @@ final class FxService
return $shared->refreshCurrencyCatalog();
}
if ($this->repository === null) {
return [
'synced_count' => 0,
'currencies' => [],
];
}
$payload = $this->fetchCurrenciesPayload();
$items = is_array($payload['currencies'] ?? null) ? $payload['currencies'] : [];
if ($items === []) {
@@ -349,8 +342,6 @@ final class FxService
$sortOrder++;
}
$this->repository->saveCurrencies($synced);
usort($synced, static function (array $left, array $right): int {
return [$left['sort_order'], $left['code']] <=> [$right['sort_order'], $right['code']];
});
@@ -796,16 +787,7 @@ final class FxService
private function defaultCurrencies(): array
{
if ($this->repository === null) {
return ['EUR', 'USD'];
}
try {
$currencies = $this->repository->listActiveFiatCurrencies();
return array_map(static fn (array $currency): string => (string) $currency['code'], $currencies);
} catch (\Throwable) {
return ['EUR', 'USD'];
}
return ['EUR', 'USD'];
}
private function normalizeRateDate(mixed $value): string