mirror of
https://github.com/Such-Software/xmrcheckout.git
synced 2026-10-17 05:51:34 +02:00
Add fiat invoice inputs to UI
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
export const FIAT_CURRENCY_SUGGESTIONS = [
|
||||
"USD",
|
||||
"EUR",
|
||||
"GBP",
|
||||
"CAD",
|
||||
"AUD",
|
||||
"NZD",
|
||||
"CHF",
|
||||
"JPY",
|
||||
"CNY",
|
||||
"HKD",
|
||||
"SGD",
|
||||
"INR",
|
||||
"BRL",
|
||||
"MXN",
|
||||
"SEK",
|
||||
"NOK",
|
||||
"DKK",
|
||||
"ZAR",
|
||||
"PLN",
|
||||
"KRW",
|
||||
];
|
||||
|
||||
const CURRENCY_FLAGS: Record<string, string> = {
|
||||
USD: "🇺🇸",
|
||||
EUR: "🇪🇺",
|
||||
GBP: "🇬🇧",
|
||||
CAD: "🇨🇦",
|
||||
AUD: "🇦🇺",
|
||||
NZD: "🇳🇿",
|
||||
CHF: "🇨🇭",
|
||||
JPY: "🇯🇵",
|
||||
CNY: "🇨🇳",
|
||||
HKD: "🇭🇰",
|
||||
SGD: "🇸🇬",
|
||||
INR: "🇮🇳",
|
||||
BRL: "🇧🇷",
|
||||
MXN: "🇲🇽",
|
||||
SEK: "🇸🇪",
|
||||
NOK: "🇳🇴",
|
||||
DKK: "🇩🇰",
|
||||
ZAR: "🇿🇦",
|
||||
PLN: "🇵🇱",
|
||||
KRW: "🇰🇷",
|
||||
};
|
||||
|
||||
export const getCurrencyFlag = (
|
||||
code: string | null | undefined
|
||||
): string | null => {
|
||||
if (!code) {
|
||||
return null;
|
||||
}
|
||||
return CURRENCY_FLAGS[code.trim().toUpperCase()] ?? null;
|
||||
};
|
||||
Reference in New Issue
Block a user