From 1d23bf81227b86d66841db75c2efd8e5f64a68fe Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 24 May 2016 14:59:33 -0700 Subject: signTx+Msg - show Account Unlock Request when locked --- app/scripts/lib/notifications.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app/scripts/lib') diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index 2b7cbfe66..0b55417b2 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -3,6 +3,7 @@ const uiUtils = require('../../../ui/app/util') var notificationHandlers = {} module.exports = { + createUnlockRequestNotification: createUnlockRequestNotification, createTxNotification: createTxNotification, createMsgNotification: createMsgNotification, } @@ -24,6 +25,19 @@ chrome.notifications.onClosed.addListener(function(notificationId){ }) // creation helper +function createUnlockRequestNotification(opts){ + var message = 'An Ethereum app has requested a signature. Please unlock your account.' + + var id = createId() + chrome.notifications.create(id, { + type: 'basic', + iconUrl: '/images/icon-128.png', + title: opts.title, + message: message, + }) + +} + function createTxNotification(opts){ var message = [ 'to: '+uiUtils.addressSummary(opts.txParams.to), -- cgit