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

Reward is less than 0 #2

Open
kennyrowe opened this issue Feb 15, 2019 · 1 comment
Open

Reward is less than 0 #2

kennyrowe opened this issue Feb 15, 2019 · 1 comment

Comments

@kennyrowe
Copy link

Currently, if a reward is less than 0 the message back to the user is

"Woohoo! You voted on the winning side of the challenge against @xxx listing. As a result, you've been rewarded 0 TCRP. Your new balance is XXX TCRP."

Suggest adding a few decimal places if a reward is less than 0 to convey the fact that some tokens were transferred, just not very many.

@fergyfresh
Copy link

fergyfresh commented May 23, 2019

That's happening because the data that's being printed is being converted to an Integer and not a Float.

tcrpartybot/events/eth.go

Lines 171 to 172 in c7492cc

humanBalance := contracts.GetHumanTokenAmount(balance).Int64()
humanReward := contracts.GetHumanTokenAmount(claim.Reward).Int64()

If you changed those two lines and rounded to an acceptable number of decimal places you could fix this.

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