Register rate providers in DI, so it can be accessed by plugins (#4551)

This commit is contained in:
Nicolas Dorier
2023-01-30 09:46:12 +09:00
committed by GitHub
parent c0c34fbb41
commit b818352a04
32 changed files with 219 additions and 172 deletions

View File

@@ -759,8 +759,7 @@ namespace BTCPayServer.Controllers
private IEnumerable<AvailableRateProvider> GetSupportedExchanges()
{
var exchanges = _RateFactory.RateProviderFactory.GetSupportedExchanges();
return exchanges
return _RateFactory.RateProviderFactory.AvailableRateProviders
.Where(r => !string.IsNullOrWhiteSpace(r.Name))
.OrderBy(s => s.Id, StringComparer.OrdinalIgnoreCase);