Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get account on 01 - Hello World #1

Open
HGyllensvard opened this issue Oct 1, 2022 · 0 comments
Open

Can't get account on 01 - Hello World #1

HGyllensvard opened this issue Oct 1, 2022 · 0 comments

Comments

@HGyllensvard
Copy link

Apologies if this is wrong but I tried to execute the and learn using the 01 - Hello World example but I ran into an issue settings the name.

The function

web3.eth.getAccounts(function (error, accounts) {

Never returned any accounts in the callback.

Looking online I found this thread mentioning to use requestAccounts instead.

Now requestAccounts is not available in the project's current web3 version but upon upgrading web3 and changing the function I now get the metamask account and can successfully interact with the contract.

As I am just starting here I don't know if this is the right or safe alternative, hence why I'm opening an issue to inform you.

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

No branches or pull requests

2 participants
@HGyllensvard and others