[Fix] CurrencyValue parsing shouldn't depend on locale

This commit is contained in:
Nicolas Dorier
2021-10-21 19:15:02 +09:00
committed by GitHub
parent 4cf3249e0b
commit d8a162fb6e

View File

@@ -17,7 +17,7 @@ namespace BTCPayServer
}
var match = _Regex.Match(str);
if (!match.Success ||
!decimal.TryParse(match.Groups[1].Value, out var v))
!decimal.TryParse(match.Groups[1].Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var v))
return false;
var currency = match.Groups[match.Groups.Count - 1].Value.ToUpperInvariant();