Tool Improvement: Showing Resource Credit in Witness and Account Page

in witness-category •  last year 

I have added the information in both Account and Witness Page:

For example:

Account Page: https://steemyy.com/account/justyy
Witness Account Page: https://steemyy.com/witness-data/justyy

image.png

image.png

PS: thanks to @steemchiller here is a way to get RC using existing steem-js library.

steem.api.send(
   "rc_api",
   {
      method: "find_rc_accounts",
      params: { accounts: [ "justyy" ] }
   },
   ( err, result ) => { log(result)}
);

You can wrap it in a function:

function findRcAccounts(accountName) {
    return new Promise((resolve, reject) => {
        steem.api.send(
            "rc_api",
            {
                method: "find_rc_accounts",
                params: { accounts: [accountName] }
            },
            (err, result) => {
                if (err) {
                    reject(err);
                } else {
                    resolve(result);
                }
            }
        );
    });
}

// Example usage
findRcAccounts("justyy")
    .then(result => {
        console.log(result);
    })
    .catch(error => {
        console.error("Error fetching RC account:", error);
    });

image.png

SteemJs Playground

Steem to the Moon🚀!

  • You can swap the STEEM/SBD to Tether USDT (TRC-20) via steem2usdt!
  • You can swap the STEEM/SBD to TRX (TRON) via steem2trx!
  • You can swap the STEEM/SBD to BTS (BitShares) via steem2bts!
  • Register a free STEEM account at SteemYY!
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!