1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

fix #341 close notifications when oppening pop up

This commit is contained in:
Frankie 2016-06-28 11:57:33 -07:00
parent 3d9bedaeea
commit 4f4c5048bf
2 changed files with 10 additions and 2 deletions

View File

@ -324,6 +324,7 @@ App.prototype.renderPrimary = function () {
return h(SendTransactionScreen, {key: 'send-transaction'}) return h(SendTransactionScreen, {key: 'send-transaction'})
case 'confTx': case 'confTx':
this.clearNotifications()
return h(ConfirmTxScreen, {key: 'confirm-tx'}) return h(ConfirmTxScreen, {key: 'confirm-tx'})
case 'config': case 'config':
@ -355,3 +356,10 @@ App.prototype.toggleMetamaskActive = function () {
} }
} }
App.prototype.clearNotifications = function () {
chrome.notifications.getAll( function (object) {
for (let notification in object){
chrome.notifications.clear(notification)
}
})
};