Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Metamask error #19

Open
manuzy opened this issue May 26, 2021 · 0 comments
Open

Metamask error #19

manuzy opened this issue May 26, 2021 · 0 comments

Comments

@manuzy
Copy link

manuzy commented May 26, 2021

I installed according to guidelines, and get the following error although Metamask is working and not "locked".

Unhandled Rejection (TypeError): Cannot read property 'accounts' of undefined
App.getAccount
src/App.js:102
99 |
100 | getAccount() {
101 | const { web3 } = this.state;

102 | if (web3.eth.accounts[0]) return web3.eth.accounts[0];
103 | throw new Error('Your MetaMask is locked. Unlock it to continue.');
104 | }
105 |
View compiled
App._callee$
src/App.js:58
55 | const naturalUnit = new BigNumber(10);
56 | const name = 'My Set';
57 | const symbol = 'MS';
58 | const account = this.getAccount();
59 | const txOpts = {
60 | from: account,
61 | gas: 4000000,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant