diff --git a/src/features/crypto-donate/components/crypto-icon.tsx b/src/features/crypto-donate/components/crypto-icon.tsx index e829f9bbd..f135c3bc3 100644 --- a/src/features/crypto-donate/components/crypto-icon.tsx +++ b/src/features/crypto-donate/components/crypto-icon.tsx @@ -4,9 +4,11 @@ import genericIcon from 'soapbox/assets/cryptocurrency/generic.svg'; /** Get crypto icon URL by ticker symbol, or fall back to generic icon */ function getIcon(ticker: string): string { - const modules: Record = import.meta.glob('../../../assets/cryptocurrency/*.svg', { eager: true }); - const key = `../../../assets/cryptocurrency/${ticker}.svg`; - return modules[key]?.default || genericIcon; + try { + return new URL(`../../../assets/cryptocurrency/${ticker}.svg`, import.meta.url).href; + } catch { + return genericIcon; + } } interface ICryptoIcon {