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

Mixed up ETH and USD #1

Open
neuhaus opened this issue Dec 8, 2017 · 0 comments
Open

Mixed up ETH and USD #1

neuhaus opened this issue Dec 8, 2017 · 0 comments

Comments

@neuhaus
Copy link

neuhaus commented Dec 8, 2017

In the faucet function you are mixing up ETH and USD in the status report message

    sendMessage(session, `FYI you've recieved ${count} eth from the me so far 😎`)

count contains a USD amount, not an ETH amount.

Also using a float for money or cryptocurrency is not a great idea, you get rounding errors quickly.

Best to convert to the smallest unit available (cents or wei) and use integer arithmetics.

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

1 participant