1
0
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:
Jkorf
2025-07-21 09:42:52 +02:00
parent f739520e52
commit 3d942bd503
3 changed files with 39 additions and 15 deletions
@@ -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)