[Steemplus API] [v1.0] [Bug-Report] Not counting SPP for transfers to postpromoter

in #utopian-io6 years ago (edited)

Project Information

Expected behavior

SteemPlus Points (SPP) should be rewarded for various activities, such as promoting your post with minnowbooster or postpromoter.

Actual behavior

Only transfers to minnowbooster are counted. This is caused by a wrong condition in the sql statement that the job uses to calculate the points.
Other activities to earn points like setting steemplus-pay as a beneficiary still works as expected.

How to reproduce

  • Send 1 SBD to postpromoter
  • Wait 1 hour so that the job runs
  • Check the API to see that your points weren't updated and the transfer wasn't included.

Solution

The solution is very simple.
In the SQL-Statement one has to replace the [from] with a [to].
Turning from this:

To this:

Another indicator that "to" is the right field to use is the fact that later the field is later used to determine the type of transaction.

I would have made a Pull-Request for it, but after telling @cedricguillas (who is in charge for this function) what and where the problem is he immediately started working on it. (Making a PR and juggle with the issue would probably be just more overhead than quickly replacing the word himself. )

Recording Of The Bug

Before promoting my post with postpromoter:

Promoting a post:

After promoting my post with postpromoter:

(click the picture to enlarge)
It is somewhat difficult to see , but my points weren't increased and only the transfer to minnowbooster which I had before was counted.

GitHub Account

https://github.com/MWFIAE
Issue

Like mentioned I contacted @cedricguillas about this issue. He confirmed the bug and implemented my suggested solution. (Unfortunately before I could ;) )

Sort:  

Hey, @mwfiae!

Thank you for your amazing report, posts like these are the reason we included Has the contributor looked for the possible cause of the issue and/or submitted his own ideas for implementing a fix to this problem? in the score questionnaire. You pinpointing the exact issue makes fixing the problem significantly easier for the project owner and it has a much greater chance of being noticed due to not taking as much development time to fix.

This is clearly a cirtical issue as it offers false promises to the users supporting the app with their funds. Thanks to the quality of your report, I have decided to Staff Pick your contribution warranting the highest possible vote, but your post received 100 points either way, it was that awesome!

Thank you for contributing through Utopian and we hope to see more from you in the future.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @jestemkioskiem!

So far this week you've reviewed 2 contributions. Keep up the good work!

You have a minor misspelling in the following sentence:

(Unfortunatly before I could ;) )
It should be unfortunately instead of unfortunatly.

Thank you @grammarnazi, hope everything is now according to german standards! :)

Hi @mwfiae!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @mwfiae!

Thanks for contributing on Utopian.
Congratulations! Your contribution was Staff Picked to receive a maximum vote for the bug-hunting category on Utopian for being of significant value to the project and the open source community.

We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Congratulations @mwfiae! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the number of comments received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard - Witness Update

Support SteemitBoard's project! Vote for its witness and get one more award!

You guys are doing a nice job.

Congratulations @mwfiae! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 19000 upvotes. Your next target is to reach 20000 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

The new Steemfest³ Award is ready!
Be ready for the next contest!

Support SteemitBoard's project! Vote for its witness and get one more award!