final
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user