Merge pull request #6619 from MetaMask/bugfix/enable-locked

bugfix: show extension window if locked regardless of approval
feature/default_network_editable
Dan Finlay 6 years ago committed by GitHub
commit e880e2790f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/scripts/controllers/provider-approval.js

@ -38,7 +38,8 @@ class ProviderApprovalController extends SafeEventEmitter {
// only handle requestAccounts // only handle requestAccounts
if (req.method !== 'eth_requestAccounts') return next() if (req.method !== 'eth_requestAccounts') return next()
// if already approved or privacy mode disabled, return early // if already approved or privacy mode disabled, return early
if (this.shouldExposeAccounts(origin)) { const isUnlocked = this.keyringController.memStore.getState().isUnlocked
if (this.shouldExposeAccounts(origin) && isUnlocked) {
res.result = [this.preferencesController.getSelectedAddress()] res.result = [this.preferencesController.getSelectedAddress()]
return return
} }

Loading…
Cancel
Save