fix account enable not working on status
This commit is contained in:
parent
37c3b73e94
commit
62f7a88faf
|
@ -93,8 +93,8 @@ class App extends React.Component {
|
||||||
|
|
||||||
enableEthereum = async () => {
|
enableEthereum = async () => {
|
||||||
try {
|
try {
|
||||||
await window.ethereum.enable()
|
const accounts = await EmbarkJS.enableEthereum();
|
||||||
const account = await web3.eth.getCoinbase()
|
const account = accounts[0]
|
||||||
this.setState({ account })
|
this.setState({ account })
|
||||||
this.web3Init()
|
this.web3Init()
|
||||||
return account
|
return account
|
||||||
|
|
Loading…
Reference in New Issue