alpineintel / tcrpartybot

A Twitter bot for interacting with a TCR without knowing what a blockchain is
https://www.tcr.party
MIT License
28 stars 5 forks source link

Reward is less than 0 #2

Open kennyrowe opened 5 years ago

kennyrowe commented 5 years ago

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 commented 5 years ago

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

https://github.com/alpineintel/tcrpartybot/blob/c7492cc1da9eeb1867dd44e6a7a370bc8caf80f4/events/eth.go#L171-L172

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