Open RaynHarr opened 4 years ago
Hi Hoping to get some eyes on this. Trying to get through the Capstone project and for some reason my array of accounts is coming up blank [] in the console:
[]
import React, { Component } from 'react'; import './App.css'; import Web3 from 'web3' class App extends Component { componentWillMount() { this.loadBlockchainData() } async loadBlockchainData() { const web3 = new Web3(Web3.givenProvider || 'http://localhost:7545') const network = await web3.eth.net.getNetworkType() const accounts = await web3.eth.getAccounts() console.log('accounts', accounts) }
Hi Hoping to get some eyes on this. Trying to get through the Capstone project and for some reason my array of accounts is coming up blank
[]
in the console: