Skip to content

Commit 8a69976

Browse files
authored
Binance currencies null ref fix (#788)
* Fix for Binance currencies * Null key fix for binance ongetcurrencies
1 parent b1a2a82 commit 8a69976

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ protected override async Task<IReadOnlyDictionary<string, ExchangeCurrency>> OnG
104104
Dictionary<string, object> payload = await GetNoncePayloadAsync();
105105
var result = await MakeJsonRequestAsync<List<Currency>>("/capital/config/getall", BaseUrlSApi, payload);
106106

107-
return result.ToDictionary(x => x.AssetCode, x => new ExchangeCurrency
107+
return result.Where(x => !string.IsNullOrWhiteSpace(x.AssetCode))
108+
.ToDictionary(x => x.AssetCode, x => new ExchangeCurrency
108109
{
109110
Name = x.AssetCode,
110111
FullName = x.AssetName,

0 commit comments

Comments
 (0)