mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 21:32:27 +01:00
Prevent stackoverflow exception when ripio is unavailable
This commit is contained in:
parent
a64b8fb310
commit
0c43fda86d
@ -21,6 +21,7 @@ namespace BTCPayServer.Services.Rates
|
||||
public async Task<PairRate[]> GetRatesAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var response = await _httpClient.GetAsync("https://api.exchange.ripio.com/api/v1/rate/all/", cancellationToken);
|
||||
response.EnsureSuccessStatusCode();
|
||||
var jarray = (JArray)(await response.Content.ReadAsAsync<JArray>(cancellationToken));
|
||||
return jarray
|
||||
.Children<JObject>()
|
||||
|
Loading…
Reference in New Issue
Block a user