mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Use better default than coingecko when creating a new store (#4416)
* Use better default than coingecko when creating a new store * Improve recommended exchange UX * Add btcturk for TRY * Fix recommendation Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
This commit is contained in:
@@ -44,7 +44,7 @@ namespace BTCPayServer.Controllers
|
||||
var vm = new CreateStoreViewModel
|
||||
{
|
||||
DefaultCurrency = StoreBlob.StandardDefaultCurrency,
|
||||
Exchanges = GetExchangesSelectList(CoinGeckoRateProvider.CoinGeckoName)
|
||||
Exchanges = GetExchangesSelectList(null)
|
||||
};
|
||||
|
||||
return View(vm);
|
||||
@@ -99,7 +99,9 @@ namespace BTCPayServer.Controllers
|
||||
var exchanges = _rateFactory.RateProviderFactory
|
||||
.GetSupportedExchanges()
|
||||
.Where(r => !string.IsNullOrWhiteSpace(r.Name))
|
||||
.OrderBy(s => s.Id, StringComparer.OrdinalIgnoreCase);
|
||||
.OrderBy(s => s.Id, StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
exchanges.Insert(0, new AvailableRateProvider(null, "Recommended", ""));
|
||||
var chosen = exchanges.FirstOrDefault(f => f.Id == selected) ?? exchanges.First();
|
||||
return new SelectList(exchanges, nameof(chosen.Id), nameof(chosen.Name), chosen.Id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user