Files
cbd420/lib/payment-currencies.ts
2025-12-21 17:36:44 +01:00

28 lines
614 B
TypeScript

/**
* Allowed payment cryptocurrencies
*
* Edit this list to add or remove supported payment currencies.
* All currencies should be in lowercase.
*/
export const ALLOWED_PAYMENT_CURRENCIES = [
'btc',
'eth',
'sol',
'xrp',
'bnbbsc',
'usdterc20',
] as const
/**
* Type for allowed payment currency
*/
export type AllowedPaymentCurrency = typeof ALLOWED_PAYMENT_CURRENCIES[number]
/**
* Check if a currency is in the allowed list
*/
export function isAllowedCurrency(currency: string): boolean {
return ALLOWED_PAYMENT_CURRENCIES.includes(currency.toLowerCase() as AllowedPaymentCurrency)
}