mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-16 19:03:01 +00:00
Updated decimal parser to support "NaN" and "-Infinity" strings, added check for negative overflow value, improved performance in most cases
This commit is contained in:
@@ -386,7 +386,7 @@ namespace CryptoExchange.Net.Testing.Comparers
|
||||
var stringValue = jsonValue.GetString();
|
||||
if (objectValue is decimal dec)
|
||||
{
|
||||
if (decimal.Parse(stringValue!, CultureInfo.InvariantCulture) != dec)
|
||||
if (ExchangeHelpers.ParseDecimal(stringValue!) != dec)
|
||||
throw new Exception($"{method}: {property} not equal: {stringValue} vs {dec}");
|
||||
}
|
||||
else if (objectValue is DateTime time)
|
||||
|
||||
Reference in New Issue
Block a user