Fix: Exchangerate.host falsly appear as Yadio in the UI (Fix #5347)

This commit is contained in:
nicolas.dorier 2023-09-26 14:45:46 +09:00
parent 66a064e78b
commit 75396f491b
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
@ -11,7 +11,7 @@ namespace BTCPayServer.Services.Rates;
public class ExchangeRateHostRateProvider : IRateProvider
{
public RateSourceInfo RateSourceInfo => new("exchangeratehost", "Yadio", "https://api.exchangerate.host/latest?base=BTC");
public RateSourceInfo RateSourceInfo => new("exchangeratehost", "Exchangerate.host", "https://api.exchangerate.host/latest?base=BTC");
private readonly HttpClient _httpClient;
public ExchangeRateHostRateProvider(HttpClient httpClient)
{

View file

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