Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to fetch #766

Closed
Gannervi opened this issue Aug 23, 2018 · 0 comments
Closed

Failed to fetch #766

Gannervi opened this issue Aug 23, 2018 · 0 comments

Comments

@Gannervi
Copy link

TypeError: Failed to fetch 
 While processing action: 
 function (dispatch, getState, api) {
    var tokens = getState().tokens.get('tokens').toJS();
    // build batch call request
    var batch = tokens.map(function (token) {
      return {
        id: token.address,
        to: token.address,
        data: tokenContract.functionToData('balanceOf', { _owner: address })
      };
    });

    return api.geth.ext.batchCall(batch).then(function (results) {
      var balances = tokens.map(function (token) {
        return {
          tokenAddress: token.address,
          amount: results[token.address].result
        };
      });

      dispatch({
        type: _actionTypes2.default.SET_TOKENS_BALANCES,
        accountId: address,
        balances: balances
      });
    });
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants