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

This commit is contained in:
2026-06-22 00:43:44 +02:00
parent 9ac08d8c8a
commit c6bdcb988e

View File

@@ -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));