mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-29 20:04:18 +01:00
Fix bitbank and yadio rate providers (#4432)
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user