Open Balint1 opened 7 months ago
I've been getting this error for 12 hours and I'm about to go crazy and sometimes it gives an error like this: "No response on query received"
This line: result = Enum.Parse(objectType, value, true);
in EnumConverter.cs is kind of desaster. No check that this value exists.
This is my quick & dirty fix:
var eList = Enum.GetNames(objectType).Select(s => s.ToLower()).ToList();
if (eList.Contains(value.ToLower()))
{
result = Enum.Parse(objectType, value, true);
return true;
}
else
{
result = default;
return false;
}
I'm afraid there are other unsafe places in the code with Enum.Parse
I'm not sure where you got that snippet from, it's not actually in the EnumConverter. The source of which can be found here: https://github.com/JKorf/CryptoExchange.Net/blob/master/CryptoExchange.Net/Converters/EnumConverter.cs
The code gives the error above.At least I didn't get it from somewhere
I'm not sure where you got that snippet from, it's not actually in the EnumConverter. The source of which can be found here: https://github.com/JKorf/CryptoExchange.Net/blob/master/CryptoExchange.Net/Converters/EnumConverter.cs
This was only my fix for the EnumConverter.cs Problem in Line 124.
Describe the bug Cannot map AccountType TRD_GRP_024
To Reproduce var resultInfo = await client.SpotApi.ExchangeData.GetExchangeInfoAsync();
Expected behavior Succesfully mapping the missing enum value