Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lottery-react/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class App extends Component {

onSubmit = async event => {
event.preventDefault();

await window.ethereum.enable();
const accounts = await web3.eth.getAccounts();

this.setState({ message: 'Waiting on transaction success...' });
Expand All @@ -36,6 +36,7 @@ class App extends Component {
};

onClick = async () => {
await window.ethereum.enable();
const accounts = await web3.eth.getAccounts();

this.setState({ message: 'Waiting on transaction success...' });
Expand Down