aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/notifications.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-06-29 04:14:38 +0800
committerkumavis <aaron@kumavis.me>2016-06-29 04:14:38 +0800
commit19f9d6566bb9a8f28a33de8e235fbb28b0c2c021 (patch)
tree49362cd9c10c8170bc11e3e1f6c2eff819ca63df /app/scripts/lib/notifications.js
parent1cd17af2ad494e36ee37740648ccd8c47994ec82 (diff)
parent913533522f650e340a369103f2d8018a92ad9bc1 (diff)
downloadtangerine-wallet-browser-19f9d6566bb9a8f28a33de8e235fbb28b0c2c021.tar
tangerine-wallet-browser-19f9d6566bb9a8f28a33de8e235fbb28b0c2c021.tar.gz
tangerine-wallet-browser-19f9d6566bb9a8f28a33de8e235fbb28b0c2c021.tar.bz2
tangerine-wallet-browser-19f9d6566bb9a8f28a33de8e235fbb28b0c2c021.tar.lz
tangerine-wallet-browser-19f9d6566bb9a8f28a33de8e235fbb28b0c2c021.tar.xz
tangerine-wallet-browser-19f9d6566bb9a8f28a33de8e235fbb28b0c2c021.tar.zst
tangerine-wallet-browser-19f9d6566bb9a8f28a33de8e235fbb28b0c2c021.zip
Merge branch 'master' into pr/351
# Conflicts: # CHANGELOG.md # app/scripts/lib/notifications.js
Diffstat (limited to 'app/scripts/lib/notifications.js')
-rw-r--r--app/scripts/lib/notifications.js49
1 files changed, 11 insertions, 38 deletions
diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js
index a31949108..35ee5b6d7 100644
--- a/app/scripts/lib/notifications.js
+++ b/app/scripts/lib/notifications.js
@@ -53,62 +53,30 @@ function createUnlockRequestNotification (opts) {
})
}
-function createTxNotification (opts) {
+function createTxNotification (state) {
// guard for chrome bug https://github.com/MetaMask/metamask-plugin/issues/236
if (!chrome.notifications) return console.error('Chrome notifications API missing...')
- var state = {
- title: 'New Unsigned Transaction',
- imageifyIdenticons: false,
- txData: {
- txParams: opts.txParams,
- time: (new Date()).getTime(),
- },
- identities: {
-
- },
- accounts: {
-
- },
- onConfirm: opts.confirm,
- onCancel: opts.cancel,
- }
-
renderTxNotificationSVG(state, function(err, notificationSvgSource){
if (err) throw err
showNotification(extend(state, {
+ title: 'New Unsigned Transaction',
imageUrl: toSvgUri(notificationSvgSource),
}))
})
}
-function createMsgNotification (opts) {
+function createMsgNotification (state) {
// guard for chrome bug https://github.com/MetaMask/metamask-plugin/issues/236
if (!chrome.notifications) return console.error('Chrome notifications API missing...')
- var state = {
- title: 'New Unsigned Message',
- imageifyIdenticons: false,
- txData: {
- msgParams: opts.msgParams,
- time: (new Date()).getTime(),
- },
- identities: {
-
- },
- accounts: {
-
- },
- onConfirm: opts.confirm,
- onCancel: opts.cancel,
- }
-
renderMsgNotificationSVG(state, function(err, notificationSvgSource){
if (err) throw err
showNotification(extend(state, {
+ title: 'New Unsigned Message',
imageUrl: toSvgUri(notificationSvgSource),
}))
@@ -154,8 +122,8 @@ function renderNotificationSVG(content, cb){
var container = document.createElement('div')
var confirmView = h('div.app-primary', {
style: {
- width: '450px',
- height: '300px',
+ width: '360px',
+ height: '240px',
padding: '16px',
// background: '#F7F7F7',
background: 'white',
@@ -176,8 +144,13 @@ function renderNotificationSVG(content, cb){
}
function svgWrapper(content){
+<<<<<<< HEAD
+ var wrapperSource = `
+ <svg xmlns="http://www.w3.org/2000/svg" width="360" height="240">
+=======
var wrapperSource = `
<svg xmlns="http://www.w3.org/2000/svg" width="450" height="300">
+>>>>>>> master
<foreignObject x="0" y="0" width="100%" height="100%">
<body xmlns="http://www.w3.org/1999/xhtml" height="100%">{{content}}</body>
</foreignObject>