aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/lib/notifications.js20
-rw-r--r--ui/app/reducers/app.js11
2 files changed, 9 insertions, 22 deletions
diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js
index de9cf26e3..d33db0ef9 100644
--- a/app/scripts/lib/notifications.js
+++ b/app/scripts/lib/notifications.js
@@ -1,14 +1,4 @@
-const createId = require('hat')
-const extend = require('xtend')
-const unmountComponentAtNode = require('react-dom').unmountComponentAtNode
-const findDOMNode = require('react-dom').findDOMNode
-const render = require('react-dom').render
-const h = require('react-hyperscript')
-const PendingTxDetails = require('../../../ui/app/components/pending-tx-details')
-const PendingMsgDetails = require('../../../ui/app/components/pending-msg-details')
-const MetaMaskUiCss = require('../../../ui/css')
const extension = require('./extension')
-var notificationHandlers = {}
const notifications = {
createUnlockRequestNotification: createUnlockRequestNotification,
@@ -32,11 +22,11 @@ function createMsgNotification (state) {
function showNotification() {
extension.windows.create({
- url:"notification.html",
- type:"detached_panel",
- focused:true,
- width:360,
- height:500,
+ url: 'notification.html',
+ type: 'detached_panel',
+ focused: true,
+ width: 360,
+ height: 500,
})
}
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index cbf64bf95..deebf02be 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -254,14 +254,11 @@ function reduceApp (state, action) {
const isNotification = window.METAMASK_UI_TYPE === 'notification'
if (isNotification) {
- return extension.windows.getCurrent({}, function(win) {
- extension.windows.remove(win.id, function(err) {
- if (err) console.err(err)
- })
- })
- } else {
- debugger
+ extension.windows.getCurrent({}, (win) => {
+ extension.windows.remove(win.id, console.error)
+ })
}
+
return extend(appState, {
transForward: false,
warning: null,