diff options
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r-- | app/scripts/metamask-controller.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index cffc5797b..d8f8a4602 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -275,7 +275,8 @@ module.exports = class MetamaskController extends EventEmitter { getAccounts: async ({ origin }) => { // Expose no accounts if this origin has not been approved, preventing // account-requring RPC methods from completing successfully - if (origin !== 'MetaMask' && !this.providerApprovalController.isApproved(origin)) { return [] } + const isApproved = await this.providerApprovalController.isApproved(origin) + if (origin !== 'MetaMask' && !isApproved) { return [] } const isUnlocked = this.keyringController.memStore.getState().isUnlocked const selectedAddress = this.preferencesController.getSelectedAddress() // only show address if account is unlocked @@ -454,6 +455,7 @@ module.exports = class MetamaskController extends EventEmitter { approveProviderRequest: providerApprovalController.approveProviderRequest.bind(providerApprovalController), clearApprovedOrigins: providerApprovalController.clearApprovedOrigins.bind(providerApprovalController), rejectProviderRequest: providerApprovalController.rejectProviderRequest.bind(providerApprovalController), + forceInjection: providerApprovalController.forceInjection.bind(providerApprovalController), } } |