Remove ability to set custom cache, fix coinaverage not really using coinaverage

This commit is contained in:
nicolas.dorier
2020-01-17 14:16:12 +09:00
parent 9739f3fb25
commit 7d545ca682
9 changed files with 34 additions and 43 deletions

View File

@@ -19,7 +19,7 @@ namespace BTCPayServer.Models.StoreViewModels
public void SetExchangeRates(IEnumerable<AvailableRateProvider> supportedList, string preferredExchange)
{
var defaultStore = preferredExchange ?? CoinGeckoRateProvider.CoinGeckoName;
supportedList = supportedList.Select(a => new AvailableRateProvider(a.Id, GetName(a), a.Url, a.Source)).ToArray();
supportedList = supportedList.Select(a => new AvailableRateProvider(a.Id, a.SourceId, GetName(a), a.Url, a.Source)).ToArray();
var chosen = supportedList.FirstOrDefault(f => f.Id == defaultStore) ?? supportedList.FirstOrDefault();
Exchanges = new SelectList(supportedList, nameof(chosen.Id), nameof(chosen.Name), chosen);
PreferredExchange = chosen.Id;