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

Metamask error #19

@manuzy

Description

@manuzy

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions