diff options
author | kumavis <aaron@kumavis.me> | 2016-06-24 07:42:40 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2016-06-24 07:42:40 +0800 |
commit | 3cf7bf725f24b81894ded57df2abf7840b27d086 (patch) | |
tree | 85a1811cc79fa83110a7b5c548c15f50029b7c21 /app | |
parent | d293ef0494ae6b1ff284611603a3268e5056c5d4 (diff) | |
download | tangerine-wallet-browser-3cf7bf725f24b81894ded57df2abf7840b27d086.tar.gz tangerine-wallet-browser-3cf7bf725f24b81894ded57df2abf7840b27d086.tar.zst tangerine-wallet-browser-3cf7bf725f24b81894ded57df2abf7840b27d086.zip |
svg notif - use actual txParams
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/notifications.js | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index 1b8118490..f7d7ab6d8 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -55,15 +55,8 @@ function createUnlockRequestNotification (opts) { function createTxNotification (opts) { // guard for chrome bug https://github.com/MetaMask/metamask-plugin/issues/236 if (!chrome.notifications) return console.error('Chrome notifications API missing...') - var message = [ - 'Submitted by ' + opts.txParams.origin, - 'to: ' + uiUtils.addressSummary(opts.txParams.to), - 'from: ' + uiUtils.addressSummary(opts.txParams.from), - 'value: ' + uiUtils.formatBalance(opts.txParams.value), - 'data: ' + uiUtils.dataSize(opts.txParams.data), - ].join('\n') - transactionNotificationSVG(opts, function(err, source){ + renderTransactionNotificationSVG(opts, function(err, source){ var imageUrl = 'data:image/svg+xml;utf8,' + encodeURIComponent(source) @@ -74,7 +67,7 @@ function createTxNotification (opts) { iconUrl: '/images/icon-128.png', imageUrl: imageUrl, title: opts.title, - message: message, + message: '', buttons: [{ title: 'confirm', }, { @@ -117,14 +110,12 @@ function createMsgNotification (opts) { } } -function transactionNotificationSVG(opts, cb){ +function renderTransactionNotificationSVG(opts, cb){ var state = { nonInteractive: true, + inlineIdenticons: true, txData: { - txParams: { - from: '0x5fda30bb72b8dfe20e48a00dfc108d0915be9bb0', - to: '0x5fda30bb72b8dfe20e48a00dfc108d0915be9bb0', - }, + txParams: opts.txParams, time: (new Date()).getTime(), }, identities: { @@ -155,7 +146,6 @@ function transactionNotificationSVG(opts, cb){ unmountComponentAtNode(container) var svgSource = svgWrapper(viewSource) // insert content into svg wrapper - console.log(svgSource) cb(null, svgSource) }) } |