Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #246 from brave/notify-activity
Browse files Browse the repository at this point in the history
Notify browser of last wallet unlock activity
  • Loading branch information
bbondy authored Jun 22, 2021
2 parents b140b75 + a24e967 commit 6b01f43
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,13 @@ export default class MetamaskController extends EventEmitter {
const initState = opts.initState || {}

this.keyringController.memStore.subscribe((s) => this._onKeyringControllerUpdate(s))
this.keyringController.on('unlock', () => this.emit('unlock'))
this.keyringController.on('unlock', () => {
if (chrome.braveWallet && chrome.braveWallet.notifyWalletUnlock) { // eslint-disable-line no-undef
chrome.braveWallet.notifyWalletUnlock() // eslint-disable-line no-undef
}
this.emit('unlock')
})


this.permissionsController = new PermissionsController({
getKeyringAccounts: this.keyringController.getAccounts.bind(this.keyringController),
Expand Down

0 comments on commit 6b01f43

Please sign in to comment.