Bug Fixes
- What was the issue(s)?
The Voting Power and Reputation was showing wrong because it was being pulled from a third party API listed below-
let api = 'https://helloacm.com/api/steemit/account/vp/?id=' + id;
- What was the solution?
I shifted the API call to steemJS it was my first work related to any steem library.
The following code fixed the bug-
steem.api.getAccounts([id], function(err, response) {
if(!err)
{
let result = (response[0].voting_power)/100;
dom.html("<i>@" + id + "'s Voting Power is</i> <B>" + result + "%</B>");
The reputation bug was fixed using Reputation formatter in steemJS for which I needed to read code of steemJS which was quite interesting part.
New Features
- What feature(s) did you add?
I added estimated account value(in USD) using steemjs.
- How did you implement it/them?
The steemJS function was added using following code-
steem.api.getAccounts([id], function(err, response) {
if(!err)
{
var result = steem.formatter.reputation(response[0].reputation);
var steemPower = steem.formatter.estimateAccountValue(response[0]);
steemPower.then(value => dom.html("<i>@" + id + "'s Reputation is</i> <B>" + result + "</B><br><i>@" + id + "'s Total Account Value is</i> <B>$" + value + "</B>"));
logit("API Finished: Reputation - " + id);
}
});
}
- How to contribute?
Link to the Github repository, Click here.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
Thanks for the nice fixes and new feature! I'll include your changes in version 0.0.9 ^_^
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @justyy, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @ms10398 I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
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
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Your voting power is very interesting I like it very much
please help me in making like you
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit