Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Pass number as string to avoid exception #1307

Merged
merged 2 commits into from Nov 7, 2022
Merged

Pass number as string to avoid exception #1307

merged 2 commits into from Nov 7, 2022

Conversation

ghost
Copy link

@ghost ghost commented Aug 31, 2022

web3.utils.toWei(1,"ether") throws an exception:

Please pass numbers as strings or BN objects to avoid precision errors.

Corrected to web3.utils.toWei("1","ether").

@ghost ghost changed the title Pass number as strings to avoid exception Pass number as string to avoid exception Aug 31, 2022
Copy link
Contributor

@eggplantzzz eggplantzzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep this is a thing, I like it

@haltman-at
Copy link
Contributor

Hey, it looks like this PR has a merge conflict that needs to be resolved. @ilovehackathons, were you planning on handling this?

@ghost
Copy link
Author

ghost commented Nov 4, 2022

Hey, it looks like this PR has a merge conflict that needs to be resolved. @ilovehackathons, were you planning on handling this?

Done!

Copy link
Contributor

@haltman-at haltman-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

@haltman-at haltman-at merged commit fbb4903 into trufflesuite:main Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants