1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts/lib/notifications.js

43 lines
1.2 KiB
JavaScript
Raw Normal View History

const createId = require('hat')
2016-06-25 02:22:27 +02:00
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')
2016-06-25 02:22:27 +02:00
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 = {}
2016-07-12 05:53:26 +02:00
const notifications = {
createUnlockRequestNotification: createUnlockRequestNotification,
createTxNotification: createTxNotification,
createMsgNotification: createMsgNotification,
}
module.exports = notifications
window.METAMASK_NOTIFIER = notifications
2016-06-21 22:18:32 +02:00
function createUnlockRequestNotification (opts) {
showNotification()
}
function createTxNotification (state) {
showNotification()
}
function createMsgNotification (state) {
showNotification()
2016-06-25 02:22:27 +02:00
}
function showNotification() {
2016-08-17 01:46:44 +02:00
extension.windows.create({
url:"notification.html",
type:"detached_panel",
focused:true,
width:360,
height:500,
})
2016-06-25 02:22:27 +02:00
}
2016-06-23 04:28:11 +02:00