Showing Witness Vote Values

in #witness-category4 years ago

The steem.api.getAccounts allows us to query a list of accounts at the same time. And we can compute each account's witness vote value (combined of own-vote and proxy-vote).

steem.api.getAccounts(accounts, function(err, result) {
      var proxy_votes = result[i].proxied_vsf_votes;
      var vests = result[i].vesting_shares.replace(" VESTS", "");
      var sum = 0;
      for (let x of proxy_votes) {
           sum += parseFloat(x);
      }
      // total vote value --- sum             
});

We can add these information in client side, using SteemJs when the page DOM is loaded.

Example tool: https://steemyy.com/proxy/?id=justyy

image.png

Or we can add these in the server API.

Example: Witness Ranking Table, you should see extra column showing how big a witness vote is:

Witness Ranking Table: https://steemyy.com/witness-ranking/

image.png


I hope this helps!

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.028
BTC 54414.30
ETH 2295.54
USDT 1.00
SBD 2.30