Hi, i’am stuck in a HDwallet i’am trying to send a smart-contract transaction with Web3, token have 8 decimals so when i try to get the balance i’am getting the balance with balanceOf 412.583828125 it’s 9 decimals why i don’t get 8 decimals ? now i’am trying to convert toWei for sending the transaction

May 11, 2020, 7:35 PM
The problem is if i try balance * 1e8 i get 41258382812.5 with dot how can i handle that i was thinking to use Web3.utils.toWei but for 8 decimals what unit can i use ?
Wrong converison sorry 😅
May 11, 2020, 8:11 PM

© 2024 Draquery.com All rights reserved.