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
[toWei] Number works with: 1
[toWei] Number works with: 0.1
[toWei] Number works with: 0.01
[toWei] Number works with: 0.001
[toWei] Number works with: 0.0001
[toWei] Number works with: 0.00001
[toWei] Number works with: 0.000001
[toWei] Number failed with: 0.0000001
- Cannot convert 1e-7 to a BigInt
[toWei] Number failed with: 0.00000001
- Cannot convert 1e-8 to a BigInt
[toWei] Number failed with: 0.000000001
- Cannot convert 1e-9 to a BigInt
[toWei] String works with: 1
[toWei] String works with: 0.1
[toWei] String works with: 0.01
[toWei] String works with: 0.001
[toWei] String works with: 0.0001
[toWei] String works with: 0.00001
[toWei] String works with: 0.000001
[toWei] String works with: 0.0000001
[toWei] String works with: 0.00000001
[toWei] String works with: 0.000000001
Environment
Web3 4.6.0
Node 20
The text was updated successfully, but these errors were encountered:
Expected behavior
To manage to convert value to wei
Actual behavior
Throw error while converting value beyond 8th decimal point
Steps to reproduce the behavior
Logs
Created Script to test scenarios
https://github.com/BeroBurny/web3js-v4-inting/blob/58c2389176c12c297e029f8e716d70ce8db3c637/src/index.ts#L5-L46
and this produced logs
Environment
Web3 4.6.0
Node 20
The text was updated successfully, but these errors were encountered: