Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
webapp - fix provider reference
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis committed Aug 31, 2020
1 parent 189dff8 commit 53b317f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webapp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ function getAccounts () {
* https://medium.com/metamask/eip-1102-preparing-your-dapp-5027b2c9ed76
*/
async function requestAccounts () {
const provider = global.web3.currentProvider
if ('enable' in global.web3.currentProvider) {
const provider = global.provider
if ('enable' in provider) {
try {
const accounts = await provider.enable()
getAccounts()
Expand Down

0 comments on commit 53b317f

Please sign in to comment.