aaroncox / chainbb

chainBB backend services and api
https://chainbb.com
MIT License
52 stars 36 forks source link

Posting reward beneficiaries not converting to integers before OP. #20

Closed Tadasu85 closed 7 years ago

Tadasu85 commented 7 years ago

Error: transaction.operations = comment,[object Object],comment_options,[object Object] cause: comment_options.extensions = 0,[object Object] cause: 0.beneficiaries = [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] cause: beneficiaries.weight = 254.99999999999997 cause: Illegal value: 254.99999999999997 (not an integer)

Reproduction: Split the rewards on a non integer.

Suggested fix:

Before transaction OP is fired round to the nearest whole number.

Cheers Jesta :)

aaroncox commented 7 years ago

Haha good catch. I'll get this fixed in a moment.

aaroncox commented 7 years ago

Deploy is running - should be fixed on live in a few moments.

Tadasu85 commented 7 years ago

Awesome! Thanks man!