Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
reload page when MetaMask installed
Browse files Browse the repository at this point in the history
  • Loading branch information
kjozwiak committed Oct 15, 2017
1 parent 3ca4f57 commit 9946eee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/browser/reducers/dappReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const {ipcMain} = require('electron')
const messages = require('../../../js/constants/messages')
const settings = require('../../../js/constants/settings')
const getSetting = require('../../../js/settings').getSetting
const tabActions = require('../../common/actions/tabActions')
const tabState = require('../../common/state/tabState')
const config = require('../../../js/constants/config')

const dappReducer = (state, action, immutableAction) => {
action = immutableAction || makeImmutable(action)
Expand Down Expand Up @@ -45,6 +48,12 @@ const notifications = {
}
}

process.on('extension-ready', (installInfo) => {
if (installInfo.id === config.metamaskExtensionId) {
tabActions.reload(tabState.TAB_ID_ACTIVE, true)
}
})

const showDappNotification = () => {
appActions.showNotification({
greeting: notifications.text.greeting,
Expand Down

0 comments on commit 9946eee

Please sign in to comment.