Open asimaranov opened 1 year ago
It's useful to be able to provide the custom unit decimals like from_wei(123456789, 6). This is common practice in typescript API and handy when operating with token with decimals amount e.g. 6 is fetched from blockchain
from_wei(123456789, 6)
6
Related to Issue # https://github.com/web3/web3.js/issues/3169 for web3.js library
Added support for number passing to from_wei, to_wei that is interpreted as decimals number.
from_wei
to_wei
[ ] Add or update documentation related to these changes
[ ] Add entry to the release notes
https://github.com/ethereum/eth-utils/assets/25568730/9517b933-4dec-4e0b-972d-c0c31389beb9
What was wrong?
It's useful to be able to provide the custom unit decimals like
from_wei(123456789, 6)
. This is common practice in typescript API and handy when operating with token with decimals amount e.g.6
is fetched from blockchainRelated to Issue # https://github.com/web3/web3.js/issues/3169 for web3.js library
How was it fixed?
Added support for number passing to
from_wei
,to_wei
that is interpreted as decimals number.Todo:
[ ] Add or update documentation related to these changes
[ ] Add entry to the release notes
Cute Animal Picture
https://github.com/ethereum/eth-utils/assets/25568730/9517b933-4dec-4e0b-972d-c0c31389beb9