schadokar/etherscan-react

Doesn't work

Opened this issue · 1 comments

I built this project from scratch using the instructions in the tutorial. It does not work:

Unhandled Rejection (TypeError): Cannot read property 'length' of undefined
LatestBlocks.getBlocks
src/components/Latest-Blocks/Latest-Blocks.jsx:42
  39 |   <Label color="blue">Bk</Label> {latestBlock - i}
  40 | </Table.Cell>
  41 | <Table.Cell>
> 42 |   Miner {result.miner} <br></br>
     | ^  43 |   Txs {result.transactions.length}
  44 | </Table.Cell>
  45 | <Table.Cell>
View compiled

Empty array validation added. It is resolved. You might not see all the transactions and block details as the API limit is reduced to 5 req/sec/ip. You can check the errors in the browser console.