mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Prevent stackoverflow exception when ripio is unavailable
This commit is contained in:
parent
a64b8fb310
commit
0c43fda86d
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue