You are viewing a single comment's thread from:

RE: Write a Steemit Web App: Part 4 - Calculating Steem Power

in #steem-dev7 years ago

I pass the data returned from getAccountsAsync to getDynamicGlobalPropertiesAsync function by setting a variable in this and accessing this way:

        function refreshAccountData(accountName,refresh=false) {
          return steem.api.getAccountsAsync([accountName])
            .then(function (result) {

...
                this.accountData = result
...
                steem.api.getDynamicGlobalPropertiesAsync()
                  .then(function (resultGlobal) {
                    result = this.accountData
...

It works perfect! Thanks for sharing this.

Coin Marketplace

STEEM 0.16
TRX 0.13
JST 0.027
BTC 58470.49
ETH 2617.16
USDT 1.00
SBD 2.39