From 7ad4b45d22011c91bf3ab9c5ecbae07240827153 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Sat, 2 May 2026 01:25:54 +0200 Subject: [PATCH] dfdsf --- .../fx-rates/src/Domain/FxRatesService.php | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/modules/fx-rates/src/Domain/FxRatesService.php b/modules/fx-rates/src/Domain/FxRatesService.php index 86712e1..279cdd3 100644 --- a/modules/fx-rates/src/Domain/FxRatesService.php +++ b/modules/fx-rates/src/Domain/FxRatesService.php @@ -267,37 +267,6 @@ final class FxRatesService return []; } - $direct = $this->repository->listDirectHistory($fromCurrency, $toCurrency, $this->normalizeTimestamp($from), $this->normalizeTimestamp($to), $limit); - if ($direct !== []) { - return array_map(fn (array $row): array => $this->localizeRateResult($row), $direct); - } - - $inverse = $this->repository->listDirectHistory($toCurrency, $fromCurrency, $this->normalizeTimestamp($from), $this->normalizeTimestamp($to), $limit); - if ($inverse !== []) { - $result = []; - foreach ($inverse as $row) { - $inverseRate = is_numeric($row['rate'] ?? null) ? (float) $row['rate'] : null; - if ($inverseRate === null || $inverseRate <= 0) { - continue; - } - - $result[] = [ - 'fetch_id' => $row['fetch_id'] ?? null, - 'base_currency' => $fromCurrency, - 'target_currency' => $toCurrency, - 'rate' => 1 / $inverseRate, - 'rate_date' => $row['rate_date'] ?? null, - 'provider' => $row['provider'] ?? null, - 'fetched_at' => $row['fetched_at'] ?? null, - 'is_exact_pair' => false, - ]; - } - - if ($result !== []) { - return array_map(fn (array $row): array => $this->localizeRateResult($row), $result); - } - } - return $this->crossHistory($fromCurrency, $toCurrency, $from, $to, $limit); }