Skip to content

Commit 10af626

Browse files
committed
fixed invariant culture in float.Parse
1 parent a1d3e71 commit 10af626

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Packages/Sequence-Unity/Sequence/SequenceSDK/Marketplace/TransferFundsViaQR.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Globalization;
12
using System.Threading.Tasks;
23
using UnityEngine;
34
using UnityEngine.UI;
@@ -26,7 +27,7 @@ public async void Checkout()
2627
if (_order != null)
2728
{
2829
//Price must be converted into specific ScientificNotation format following eip-681 standard (see below)
29-
await SetQrCode((int)_order.order.chainId, _wallet.GetWalletAddress(), PriceValuetoEIP618Standard(float.Parse(_order.order.priceAmount)));
30+
await SetQrCode((int)_order.order.chainId, _wallet.GetWalletAddress(), PriceValuetoEIP618Standard(float.Parse(_order.order.priceAmount, CultureInfo.InvariantCulture)));
3031
_qrPanel.SetActive(true);
3132
}
3233
else Debug.LogError("Collectible order not set for checkout option.");

Packages/Sequence-Unity/Sequence/SequenceSDK/Utils/DecimalNormalizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static string ReturnToNormalString(BigInteger x, int decimals = 18)
7171
/// <returns></returns>
7272
public static float ReturnToNormal(BigInteger x, int decimals = 18)
7373
{
74-
return float.Parse(ReturnToNormalString(x, decimals));
74+
return float.Parse(ReturnToNormalString(x, decimals), CultureInfo.InvariantCulture);
7575
}
7676

7777
/// <summary>

0 commit comments

Comments
 (0)