You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using toHex function from [email protected] "utils" and facing strange behaviour regarding where this function is executed. When the function is running in localhost, everything is working as expected, hex value is right because I am getting the right number out of it, but the problem occurs when DApp is deployed in production, more specifically on Amazon's S3 Bucket. There I am getting completely different hex value, which is not correct. So I will post here statement which I tested in Chrome's console, both in localhost and production environment and respectfully their results(both in hex and decimal number). Not sure if it's a web3 bug, but I'm just trying to figure out what happens here. I'll be thankful for any feedback.
Expected behavior
To get the same result both in localhost and production when web3.utils.toHex.
Thanks for opening this issue! But I will close this issue because there are already several similar open issues with the bug or enhancement label. The current discussion about the BigInt handling in Web3.js is here.
Hi, I'm using toHex function from [email protected] "utils" and facing strange behaviour regarding where this function is executed. When the function is running in localhost, everything is working as expected, hex value is right because I am getting the right number out of it, but the problem occurs when DApp is deployed in production, more specifically on Amazon's S3 Bucket. There I am getting completely different hex value, which is not correct. So I will post here statement which I tested in Chrome's console, both in localhost and production environment and respectfully their results(both in hex and decimal number). Not sure if it's a web3 bug, but I'm just trying to figure out what happens here. I'll be thankful for any feedback.
Expected behavior
To get the same result both in localhost and production when web3.utils.toHex.
For the code provided down below:
Localhost:
0xf0503bbcf59aa40000 ---> Integer value: 4.433e+21
Production:
0xf0503bbcf59aa40000 ---> Integer value: 4.433e+21
Actual behavior
Getting different results in localhost and production.
For code provided down below:
Localhost:
0xf0503bbcf59aa40000 ---> Integer value: 4.433e+21
Production:
0x2266303530336262636635396161343030303022 ---> 1.9638456170702058e+47
Steps to reproduce the behavior
Versions
The text was updated successfully, but these errors were encountered: