mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
fix #341 close notifications when oppening pop up
This commit is contained in:
parent
3d9bedaeea
commit
4f4c5048bf
@ -176,7 +176,7 @@ function renderNotificationSVG(content, cb){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function svgWrapper(content){
|
function svgWrapper(content){
|
||||||
var wrapperSource = `
|
var wrapperSource = `
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="450" height="300">
|
<svg xmlns="http://www.w3.org/2000/svg" width="450" height="300">
|
||||||
<foreignObject x="0" y="0" width="100%" height="100%">
|
<foreignObject x="0" y="0" width="100%" height="100%">
|
||||||
<body xmlns="http://www.w3.org/1999/xhtml" height="100%">{{content}}</body>
|
<body xmlns="http://www.w3.org/1999/xhtml" height="100%">{{content}}</body>
|
||||||
@ -188,4 +188,4 @@ function svgWrapper(content){
|
|||||||
|
|
||||||
function toSvgUri(content){
|
function toSvgUri(content){
|
||||||
return 'data:image/svg+xml;utf8,' + encodeURIComponent(content)
|
return 'data:image/svg+xml;utf8,' + encodeURIComponent(content)
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user