aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/popup.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-24 06:44:50 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-24 06:44:50 +0800
commit671ca33abb93fafeb55a18543e81942c5963da8e (patch)
tree7a9ae4ac72b29e6365e10505a5c5307ad6638c9a /app/scripts/popup.js
parentb3887ffd0a33096ef63fd4bbba9b5ff559775b3e (diff)
downloadtangerine-wallet-browser-671ca33abb93fafeb55a18543e81942c5963da8e.tar
tangerine-wallet-browser-671ca33abb93fafeb55a18543e81942c5963da8e.tar.gz
tangerine-wallet-browser-671ca33abb93fafeb55a18543e81942c5963da8e.tar.bz2
tangerine-wallet-browser-671ca33abb93fafeb55a18543e81942c5963da8e.tar.lz
tangerine-wallet-browser-671ca33abb93fafeb55a18543e81942c5963da8e.tar.xz
tangerine-wallet-browser-671ca33abb93fafeb55a18543e81942c5963da8e.tar.zst
tangerine-wallet-browser-671ca33abb93fafeb55a18543e81942c5963da8e.zip
Close notification on opening main UI
Diffstat (limited to 'app/scripts/popup.js')
-rw-r--r--app/scripts/popup.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 4c729e227..90b90a7af 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -11,6 +11,7 @@ const StreamProvider = require('web3-stream-provider')
const setupMultiplex = require('./lib/stream-utils.js').setupMultiplex
const isPopupOrNotification = require('./lib/is-popup-or-notification')
const extension = require('./lib/extension')
+const notification = require('./lib/notifications')
// setup app
var css = MetaMaskUiCss()
@@ -25,6 +26,7 @@ function connectToAccountManager (cb) {
// setup communication with background
var name = isPopupOrNotification()
+ closePopupIfOpen(name)
window.METAMASK_UI_TYPE = name
var pluginPort = extension.runtime.connect({ name })
var portStream = new PortStream(pluginPort)
@@ -98,3 +100,8 @@ function setupApp (err, opts) {
})
}
+function closePopupIfOpen(name) {
+ if (name !== 'notification') {
+ notification.closePopup()
+ }
+}