This commit is contained in:
root
2025-12-21 17:36:44 +01:00
parent bb1c5b43d6
commit 8a0835c564
15 changed files with 1124 additions and 193 deletions

27
lib/payment-currencies.ts Normal file
View File

@@ -0,0 +1,27 @@
/**
* 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)
}