This commit is contained in:
root
2026-01-03 06:06:54 +00:00
parent d138dae2ca
commit eeaa9a66bb
16 changed files with 728 additions and 348 deletions

View File

@@ -43,10 +43,10 @@ export async function POST(request: NextRequest) {
)
}
// Validate crypto currency
if (!isAllowedCurrency(normalizedCryptoCurrency)) {
// Validate crypto currency - only USDT (SOL) is allowed for redemption
if (normalizedCryptoCurrency !== 'usdtsol') {
return NextResponse.json(
{ error: `Unsupported cryptocurrency. Allowed: ${ALLOWED_PAYMENT_CURRENCIES.join(', ')}` },
{ error: 'Only USDT (SOL) is supported for point redemption' },
{ status: 400 }
)
}
@@ -205,6 +205,7 @@ async function getCryptoExchangeRate(crypto: string, fiat: string): Promise<numb
'xrp': 0.6,
'bnbbsc': 300,
'usdterc20': 0.9, // Approximate CHF per USDT
'usdtsol': 0.9, // Approximate CHF per USDT on Solana
}
return mockRates[crypto.toLowerCase()] || null