Fix bitbank and yadio rate providers (#4432)

This commit is contained in:
Nicolas Dorier 2022-12-14 12:49:30 +09:00 committed by GitHub
parent e9deb13ce4
commit c9ee7d477d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -28,6 +28,7 @@ namespace BTCPayServer.Services.Rates
$"BitBank Rates API Error: {errorCode}. See https://github.com/bitbankinc/bitbank-api-docs/blob/master/errors.md for more details.");
}
return ((data as JArray) ?? new JArray())
.Where(p => p["buy"].Type != JTokenType.Null && p["sell"].Type != JTokenType.Null)
.Select(item => new PairRate(CurrencyPair.Parse(item["pair"].ToString()), CreateBidAsk(item as JObject)))
.ToArray();
}

View File

@ -31,8 +31,7 @@ namespace BTCPayServer.Services.Rates
{
string name = ((JProperty)item).Name;
int value = results[name].Value<int>();
var value = results[name].Value<decimal>();
list.Add(new PairRate(new CurrencyPair("BTC", name), new BidAsk(value)));
}