mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-05 23:13:08 +00:00
Fixes conversion issue from decimal to eth
This commit is contained in:
parent
8cd74e8ef9
commit
547043a381
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user