mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 13:26:47 +01:00
Fix bitbank and yadio rate providers (#4432)
This commit is contained in:
parent
e9deb13ce4
commit
c9ee7d477d
@ -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();
|
||||
}
|
||||
|
@ -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)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user