Incorrect Reputation Calculated using Steem Js

in #utopian-io7 years ago (edited)

Here is the code to reproduce:

steem.api.getAccounts(["mkt"], function(err, result) {
  if (!err) {
     console.log(result[0].reputation);
     console.log(steem.formatter.reputation(result[0].reputation));
  } 
});

It will output to console:

10004392664120
70

From the steemd.com we can verify @mkt 's Reputation is:

image.png

But the correct reputation is 61 instead of 70.

Environment

Browser: Chrome v64
OS: Win10 64 bit



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

wow! that's creepy Awesome!
Thanks For it. :)

Hi
Thank you for the post. It is ofcourse a programmer language that I think I may not be able to understand. But thank you
@sjob

Thank you for the contribution. It has been approved.

The funny part it got discovered while fixing reputation.(Bug found while fixing a bug).

You can contact us on Discord.

[utopian-moderator]

Hey @justyy I am @utopian-io. I have just upvoted you!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 58581.90
ETH 2278.10
USDT 1.00
SBD 2.51