MattyIce / postpromoter

Steem bid-based voting bot written in JavaScript
MIT License
45 stars 89 forks source link

Implemented SBD Printing Percentage #99

Closed therealwolf42 closed 5 years ago

AusPrinzip commented 5 years ago

The dsteem 'get_reward_fund' method you are applying in the new proposed function 'getVoteValueUSD' doesn't return a 'sbd_print_rate' attribute.

Just tested and the returned object is as follows:

{ id: 0, name: 'post', reward_balance: '832364.778 STEEM', recent_claims: '546997829206368293', last_update: '2018-12-06T17:57:33', content_constant: '2000000000000', percent_curation_rewards: 2500, percent_content_rewards: 10000, author_reward_curve: 'linear', curation_reward_curve: 'square_root' }

therealwolf42 commented 5 years ago

image

https://github.com/MattyIce/postpromoter/blob/0571d3fa6df9f682f57f2109e36860a6364aa61d/utils.js#L37

AusPrinzip commented 5 years ago

image

postpromoter/utils.js

Line 37 in 0571d3f

sbd_print_percentage = t.sbd_print_rate / 10000

Awesome, thanks for the clarification.

therealwolf42 commented 5 years ago

No problem :)

AusPrinzip commented 5 years ago

In my last PR I forgot something useful you might want update (since your PR has not been accepted yet).

I would do it myself, but since @MattyIce seems pretty busy I would rather suggest it to you.

By updating the version we can check via API whether bot owners are running the latest patch.

https://github.com/MattyIce/postpromoter/blob/9bce0e0819f6a8a7845f5d3b87084e178d1dde1f/postpromoter.js#L23

therealwolf42 commented 5 years ago

@AusPrinzip interesting, but I'm not using post promoter, so a version number won't mean anything in that case.