mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 06:54:19 +01:00
[Fix] CurrencyValue parsing shouldn't depend on locale
This commit is contained in:
@@ -17,7 +17,7 @@ namespace BTCPayServer
|
|||||||
}
|
}
|
||||||
var match = _Regex.Match(str);
|
var match = _Regex.Match(str);
|
||||||
if (!match.Success ||
|
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;
|
return false;
|
||||||
|
|
||||||
var currency = match.Groups[match.Groups.Count - 1].Value.ToUpperInvariant();
|
var currency = match.Groups[match.Groups.Count - 1].Value.ToUpperInvariant();
|
||||||
|
|||||||
Reference in New Issue
Block a user