You are viewing a single comment's thread from:

RE: SteemJS Help Needed --> 4 SBD + 4 SBD Rewards

in #steemjs6 years ago

For number 3 (where is number 2?), replacing the streamTransactions function with this, should fix the issues, by making Node.js ignore the errors. It also works when multiple operations are in one transaction:

steem.api.streamTransactions('head', function(err, result) {
  if (err) return;
  try {
    result.operations.forEach(function(op) {
      try {
        let txType = op[0]
        let txData = op[1]
        let includesVotes = checkBlockForVote(txType,txData)
        if (includesVotes) {
          console.log('POST FOUND: ', txData)
        }
      } catch (e) {}
    }, this);
  } catch (e) {}
});
Sort:  

Thank you very much :)

For number 3 (where is number 2?)

Those small typos are always the funniest.