diff options
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index c75f514d5..110852779 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -41,6 +41,7 @@ const { const firstTimeState = Object.assign({}, rawFirstTimeState, global.METAMASK_TEST_CONFIG) const STORAGE_KEY = 'metamask-config' +const METAMASK_DEBUG = process.env.METAMASK_DEBUG log.setDefaultLevel(process.env.METAMASK_DEBUG ? 'debug' : 'warn') @@ -472,3 +473,10 @@ function openPopup () { } ) } + +// On first install, open a new tab with MetaMask +extension.runtime.onInstalled.addListener(({reason}) => { + if ((reason === 'install') && (!METAMASK_DEBUG)) { + platform.openExtensionInBrowser() + } +}) |