Fix multiple TeleBot and admin panel issues
- Fix admin panel to show all pending orders (PendingPayment + PaymentReceived) - Fix currency display from USD ($) to GBP (£) throughout TeleBot - Update payment methods to use dynamic SilverPay currency list - Consolidate shipping address collection into single message - Implement cart backup/restore on payment failure - Remove unsupported XMR from TeleBot config 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,23 +32,27 @@ public class CurrencyController : ControllerBase
|
||||
// Get SilverPay supported currencies
|
||||
var silverPayCurrencies = await _silverPayService.GetSupportedCurrenciesAsync();
|
||||
|
||||
// Production currencies (always enabled if supported by SilverPay)
|
||||
var productionCurrencies = new[] { "BTC", "ETH" };
|
||||
foreach (var currency in productionCurrencies)
|
||||
{
|
||||
if (silverPayCurrencies.Contains(currency))
|
||||
{
|
||||
availableCurrencies.Add(currency);
|
||||
}
|
||||
}
|
||||
// Test currencies that should be excluded unless explicitly enabled
|
||||
var testCurrencies = new[] { "TBTC", "TETH", "TLTC", "TESTBTC", "TESTNET" };
|
||||
|
||||
// Test currencies (enabled via admin settings)
|
||||
var testCurrencies = new[] { "TBTC", "TLTC" };
|
||||
foreach (var currency in testCurrencies)
|
||||
// Add all SilverPay supported currencies except test ones
|
||||
foreach (var currency in silverPayCurrencies)
|
||||
{
|
||||
if (silverPayCurrencies.Contains(currency) &&
|
||||
await _systemSettingsService.IsTestCurrencyEnabledAsync(currency))
|
||||
var isTestCurrency = testCurrencies.Any(tc =>
|
||||
currency.Contains(tc, StringComparison.OrdinalIgnoreCase) ||
|
||||
currency.StartsWith("T", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (isTestCurrency)
|
||||
{
|
||||
// Only add test currencies if explicitly enabled in settings
|
||||
if (await _systemSettingsService.IsTestCurrencyEnabledAsync(currency))
|
||||
{
|
||||
availableCurrencies.Add(currency);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add all production currencies
|
||||
availableCurrencies.Add(currency);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user