-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
Task linked: DEV-7936 update quickstart guide |
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
DEV-7936