Fixes conversion issue from decimal to eth

This commit is contained in:
Ben 2025-08-05 14:09:19 +02:00
parent 8cd74e8ef9
commit 547043a381
No known key found for this signature in database
GPG Key ID: 0F16E812E736C24B

View File

@ -82,18 +82,19 @@ namespace Utils
public static Ether Eth(this int i)
{
return Eth(Convert.ToDecimal(i));
return Eth(new BigInteger(i));
}
public static Ether Wei(this int i)
{
return Wei(Convert.ToDecimal(i));
return Wei(new BigInteger(i));
}
public static Ether Eth(this decimal i)
{
var a = new BigInteger(i);
return new Ether(a * WeiPerEth);
var asWei = i * ((decimal)WeiPerEth);
var a = new BigInteger(asWei);
return new Ether(a);
}
public static Ether Wei(this decimal i)