aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/notifications.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-05-25 05:59:33 +0800
committerkumavis <aaron@kumavis.me>2016-05-25 05:59:33 +0800
commit1d23bf81227b86d66841db75c2efd8e5f64a68fe (patch)
tree2c10aa39c37c41a826e99de63961cb1c4056904f /app/scripts/lib/notifications.js
parent9aea88da3255a470e1833de5d356a159cd9bea0e (diff)
downloadtangerine-wallet-browser-1d23bf81227b86d66841db75c2efd8e5f64a68fe.tar
tangerine-wallet-browser-1d23bf81227b86d66841db75c2efd8e5f64a68fe.tar.gz
tangerine-wallet-browser-1d23bf81227b86d66841db75c2efd8e5f64a68fe.tar.bz2
tangerine-wallet-browser-1d23bf81227b86d66841db75c2efd8e5f64a68fe.tar.lz
tangerine-wallet-browser-1d23bf81227b86d66841db75c2efd8e5f64a68fe.tar.xz
tangerine-wallet-browser-1d23bf81227b86d66841db75c2efd8e5f64a68fe.tar.zst
tangerine-wallet-browser-1d23bf81227b86d66841db75c2efd8e5f64a68fe.zip
signTx+Msg - show Account Unlock Request when locked
Diffstat (limited to 'app/scripts/lib/notifications.js')
-rw-r--r--app/scripts/lib/notifications.js14
1 files changed, 14 insertions, 0 deletions
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),