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

Update quickstart guide #606

Merged
merged 3 commits into from
Sep 28, 2023
Merged

Update quickstart guide #606

merged 3 commits into from
Sep 28, 2023

Conversation

biancabuzea200
Copy link
Contributor

DEV-7936

@Hugoo
Copy link
Contributor

Hugoo commented Aug 20, 2023

Task linked: DEV-7936 update quickstart guide

@Hugoo Hugoo changed the title update quickstart guide Update quickstart guide Aug 28, 2023
Comment on lines -43 to -48
web3.eth.accounts.wallet.load(myDummyPassword);
// Check if there is already a key, if none exists, we create a new one
if (privateKey === '') {
let account = web3.eth.accounts.create();

// If none exists we create a new key
if (!web3.eth.accounts.wallet.length) {
web3.eth.accounts.wallet.create(1);
web3.eth.accounts.wallet.save(myDummyPassword);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biancabuzea200 Why did you remove this part?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should do the same thing. This plays better with having vars in .env

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried with the old version today that uses wallet.save, wallet.load. I found that those are browser-only (https://web3js.readthedocs.io/en/v1.2.11/web3-eth-accounts.html), so the tutorial can only be run from the browser. With the .env setup, users have more flexibility over where they can run the tutorial from. Do we want to limit devs to only run in the browser?

@Hugoo Hugoo enabled auto-merge (squash) September 28, 2023 14:48
@Hugoo Hugoo merged commit 108afac into main Sep 28, 2023
3 checks passed
@Hugoo Hugoo deleted the quickstart branch September 28, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants