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

Incorrect tx value for ETH transactions (missing last 2 decimals) #3585

Open
tonik-ru opened this issue May 2, 2023 · 1 comment
Open

Incorrect tx value for ETH transactions (missing last 2 decimals) #3585

tonik-ru opened this issue May 2, 2023 · 1 comment

Comments

@tonik-ru
Copy link

tonik-ru commented May 2, 2023

https://api-eth.bitcore.io/api/ETH/mainnet/tx/0x15596e27229957d80e763a5b7340fa6c6b9ce7bea2fccefa3c63c88513ce9d44
value: 373265727105449900

real value: 0.373265727105449914
https://etherscan.io/tx/0x15596e27229957d80e763a5b7340fa6c6b9ce7bea2fccefa3c63c88513ce9d44

actually you are using Number for tx.value, but this doesn't provide required precision! this is a huge bug! last digits may be important. for example we use this to track invoice Id (last 3-4 digits in eth value)

@kajoseph
Copy link
Collaborator

kajoseph commented May 5, 2023

Yeah we should have used something like BN.js or BigInt from the beginning. That was before my time, but my guess is it would have been a more effort than desired to ensure consistency between chains and the db. It's been in our backlog for some time to fix it.

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