From c6bdcb988e903c2240d4e2c19fc16233ef5e871f Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Mon, 22 Jun 2026 00:43:44 +0200 Subject: [PATCH] dsfdsf --- modules/mining-checker/src/Api/Router.php | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/modules/mining-checker/src/Api/Router.php b/modules/mining-checker/src/Api/Router.php index 9dae9ffc..cc6ef84c 100644 --- a/modules/mining-checker/src/Api/Router.php +++ b/modules/mining-checker/src/Api/Router.php @@ -2360,9 +2360,40 @@ final class Router ]; } + if ($catalog === []) { + $catalog = $this->fallbackCurrencyCatalog(); + } + return $this->currencyCatalogCache = $catalog; } + private function fallbackCurrencyCatalog(): array + { + $entries = [ + ['code' => 'EUR', 'name' => 'Euro'], + ['code' => 'USD', 'name' => 'US-Dollar'], + ['code' => 'DOGE', 'name' => 'Dogecoin'], + ['code' => 'BTC', 'name' => 'Bitcoin'], + ['code' => 'ETH', 'name' => 'Ethereum'], + ['code' => 'LTC', 'name' => 'Litecoin'], + ['code' => 'USDT', 'name' => 'Tether'], + ['code' => 'USDC', 'name' => 'USD Coin'], + ]; + + return array_map(function (array $entry): array { + $code = (string) $entry['code']; + + return [ + 'code' => $code, + 'name' => (string) $entry['name'], + 'symbol' => $code, + 'is_active' => 1, + 'is_crypto' => $this->isCryptoCurrencyCode($code) ? 1 : 0, + 'sort_order' => 1000, + ]; + }, $entries); + } + private function currencyCatalogEntry(string $code): ?array { $normalizedCode = strtoupper(trim($code));