mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Move clearNotifications to popup.js
This commit is contained in:
parent
c115203063
commit
16566ee7db
@ -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')
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user