diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-06-29 04:13:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-29 04:13:20 +0800 |
commit | 913533522f650e340a369103f2d8018a92ad9bc1 (patch) | |
tree | 608d036f502353db83d69ad4500fa0d6cf980f97 /app/scripts/background.js | |
parent | d4708828aa780ad3995ef61d6ec8d5130639751b (diff) | |
parent | 4777f82ae065bf630c1f1bdc0eb64eacfb4181de (diff) | |
download | tangerine-wallet-browser-913533522f650e340a369103f2d8018a92ad9bc1.tar tangerine-wallet-browser-913533522f650e340a369103f2d8018a92ad9bc1.tar.gz tangerine-wallet-browser-913533522f650e340a369103f2d8018a92ad9bc1.tar.bz2 tangerine-wallet-browser-913533522f650e340a369103f2d8018a92ad9bc1.tar.lz tangerine-wallet-browser-913533522f650e340a369103f2d8018a92ad9bc1.tar.xz tangerine-wallet-browser-913533522f650e340a369103f2d8018a92ad9bc1.tar.zst tangerine-wallet-browser-913533522f650e340a369103f2d8018a92ad9bc1.zip |
Merge pull request #350 from MetaMask/notif2
Notifications - improved readability and data
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 97e3269ba..28285fd70 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -30,21 +30,37 @@ function unlockAccountMessage () { } function showUnconfirmedMessage (msgParams, msgId) { + var controllerState = controller.getState() + createMsgNotification({ - title: 'New Unsigned Message', - msgParams: msgParams, - confirm: idStore.approveMessage.bind(idStore, msgId, noop), - cancel: idStore.cancelMessage.bind(idStore, msgId), + imageifyIdenticons: false, + txData: { + msgParams: msgParams, + time: (new Date()).getTime(), + }, + identities: controllerState.identities, + accounts: controllerState.accounts, + onConfirm: idStore.approveMessage.bind(idStore, msgId, noop), + onCancel: idStore.cancelMessage.bind(idStore, msgId), }) + } function showUnconfirmedTx (txParams, txData, onTxDoneCb) { + var controllerState = controller.getState() + createTxNotification({ - title: 'New Unsigned Transaction', - txParams: txParams, - confirm: idStore.approveTransaction.bind(idStore, txData.id, noop), - cancel: idStore.cancelTransaction.bind(idStore, txData.id), + imageifyIdenticons: false, + txData: { + txParams: txParams, + time: (new Date()).getTime(), + }, + identities: controllerState.identities, + accounts: controllerState.accounts, + onConfirm: idStore.approveTransaction.bind(idStore, txData.id, noop), + onCancel: idStore.cancelTransaction.bind(idStore, txData.id), }) + } // |