diff options
author | Csaba Solya <csaba.solya@gmail.com> | 2018-07-20 19:20:40 +0800 |
---|---|---|
committer | Csaba Solya <csaba.solya@gmail.com> | 2018-07-20 19:20:40 +0800 |
commit | a3822b4680a295848f900616e3e154a1e1003a54 (patch) | |
tree | 56f6b102b3247534c5c67ac6f35cb3c91b02b3ca /app/scripts/metamask-controller.js | |
parent | 6921f94bfe11e618dbe586e608a5b6aeaa8feadf (diff) | |
download | tangerine-wallet-browser-a3822b4680a295848f900616e3e154a1e1003a54.tar tangerine-wallet-browser-a3822b4680a295848f900616e3e154a1e1003a54.tar.gz tangerine-wallet-browser-a3822b4680a295848f900616e3e154a1e1003a54.tar.bz2 tangerine-wallet-browser-a3822b4680a295848f900616e3e154a1e1003a54.tar.lz tangerine-wallet-browser-a3822b4680a295848f900616e3e154a1e1003a54.tar.xz tangerine-wallet-browser-a3822b4680a295848f900616e3e154a1e1003a54.tar.zst tangerine-wallet-browser-a3822b4680a295848f900616e3e154a1e1003a54.zip |
add notifications
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r-- | app/scripts/metamask-controller.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 450113acf..31156b5b6 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -164,6 +164,13 @@ module.exports = class MetamaskController extends EventEmitter { }) this.txController.on('newUnapprovedTx', opts.showUnapprovedTx.bind(opts)) + this.txController.on(`tx:status-update`, (txId, status) => { + if (status === 'confirmed' || status === 'failed' || status === 'dropped') { + const txMeta = this.txController.txStateManager.getTx(txId) + this.platform.showTransactionNotification(txMeta) + } + }) + // computed balances (accounting for pending transactions) this.balancesController = new BalancesController({ accountTracker: this.accountTracker, |