fix account enable not working on status

This commit is contained in:
Barry Gitarts 2019-12-14 11:50:17 -05:00 committed by Barry G
parent 37c3b73e94
commit 62f7a88faf
1 changed files with 2 additions and 2 deletions

View File

@ -93,8 +93,8 @@ class App extends React.Component {
enableEthereum = async () => {
try {
await window.ethereum.enable()
const account = await web3.eth.getCoinbase()
const accounts = await EmbarkJS.enableEthereum();
const account = accounts[0]
this.setState({ account })
this.web3Init()
return account