fix get_token_balance without decimals
This commit is contained in:
parent
f1992b710f
commit
0913ad0d15
1 changed files with 1 additions and 1 deletions
2
core.py
2
core.py
|
|
@ -413,7 +413,7 @@ def get_token_balance(token_address, wallet_address, decimals=False):
|
|||
token_info = get_token_info(token_address)
|
||||
token_balance = token_contract.functions.balanceOf(wallet_address).call()
|
||||
if decimals:
|
||||
return float(round(token_balance, 15))
|
||||
return round(token_balance, 15)
|
||||
else:
|
||||
return float(round(from_token_decimals(token_balance, token_info['decimals']), 15))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue