Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query balance overflow #30

Closed
miaobei5555 opened this issue May 9, 2022 · 1 comment
Closed

Query balance overflow #30

miaobei5555 opened this issue May 9, 2022 · 1 comment

Comments

@miaobei5555
Copy link

TRC20ContractClient

var balance = Convert.ToDecimal(result.Balance);
if (decimals > 0)
{
balance /= Convert.ToDecimal(Math.Pow(10, decimals));
}

Change to

var balance = Nethereum.Web3.Web3.Convert.FromWeiToBigDecimal(result.Balance);

            return decimal.Parse(balance.ToString());
@stoway
Copy link
Owner

stoway commented May 12, 2022

Thanks!

@stoway stoway closed this as completed May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants