1
allLogs.forEach((log) => {
      web3.eth.getTransaction(log.transactionHash, function (err, result) {
        if (result.value) {
          console.log(result);
          console.log(
            "Transaction value : " +
              web3.utils.fromWei(result.value, "ether") +
              " ETH"
          );
          console.log("Method" + result.input.substr(0, 10));
          console.log("ascii " + web3.utils.hexToString(result.input));
          const data = {
            from: result.from,
            to: result.to,
            value: web3.utils.fromWei(result.value, "ether"),
          };
          allTransactionsData.push(data);
        }
      });
    });


Here the error occurs:

Uncaught Error: Invalid continuation byte
    at readContinuationByte (utf8.js:115:1)
    at decodeSymbol (utf8.js:155:1)
    at Object.utf8decode [as decode] (utf8.js:190:1)
    at Object.hexToUtf8 (utils.js:191:1)
    at Object.callback (useRecentTransaction.jsx:72:1)
    at sendTxCallback (index.js:546:1)
    at cb (util.js:689:1)
    at push../node_modules/process/browser.js.Item.run (browser.js:153:1)
    at drainQueue (browser.js:123:1)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.