aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/popup.js10
-rw-r--r--ui/app/app.js9
2 files changed, 10 insertions, 9 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 5173507fa..5c5cf0455 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -65,11 +65,21 @@ function getCurrentDomain (cb) {
})
}
+function clearNotifications(){
+ chrome.notifications.getAll(function (object) {
+ for (let notification in object){
+ chrome.notifications.clear(notification)
+ }
+ })
+}
+
function setupApp (err, opts) {
if (err) {
alert(err.stack)
throw err
}
+
+ clearNotifications()
var container = document.getElementById('app-content')
diff --git a/ui/app/app.js b/ui/app/app.js
index ef436d4e3..80521d220 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -325,7 +325,6 @@ App.prototype.renderPrimary = function () {
return h(SendTransactionScreen, {key: 'send-transaction'})
case 'confTx':
- this.clearNotifications()
return h(ConfirmTxScreen, {key: 'confirm-tx'})
case 'config':
@@ -356,11 +355,3 @@ App.prototype.toggleMetamaskActive = function () {
this.props.dispatch(actions.lockMetamask(false))
}
}
-
-App.prototype.clearNotifications = function () {
- chrome.notifications.getAll(function (object) {
- for (let notification in object){
- chrome.notifications.clear(notification)
- }
- })
-}