aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-24 02:15:56 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-24 02:15:56 +0800
commite5ca83d2bf7e97131e20da0ad352a38c7f8a2f86 (patch)
treeebebf02bcae19123cd5e972b225d4beb78780a5e /app/scripts/lib
parent49ab51d8251a403e242de179541fddaa0d76031e (diff)
downloadtangerine-wallet-browser-e5ca83d2bf7e97131e20da0ad352a38c7f8a2f86.tar
tangerine-wallet-browser-e5ca83d2bf7e97131e20da0ad352a38c7f8a2f86.tar.gz
tangerine-wallet-browser-e5ca83d2bf7e97131e20da0ad352a38c7f8a2f86.tar.bz2
tangerine-wallet-browser-e5ca83d2bf7e97131e20da0ad352a38c7f8a2f86.tar.lz
tangerine-wallet-browser-e5ca83d2bf7e97131e20da0ad352a38c7f8a2f86.tar.xz
tangerine-wallet-browser-e5ca83d2bf7e97131e20da0ad352a38c7f8a2f86.tar.zst
tangerine-wallet-browser-e5ca83d2bf7e97131e20da0ad352a38c7f8a2f86.zip
Emit updates to all listeners on pending tx updates
Previously the metamask controller only supported a single UI event listener, which wasn't useful for having a separate notification UI open at the same time. Also reduced the notification's complexity down to a single method, which is heavily re-used. Still has an outstanding bug where if the plugin ui dismisses the last tx, it does not close the notification popup.
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/notifications.js16
1 files changed, 1 insertions, 15 deletions
diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js
index 278c7674e..4c2aa91de 100644
--- a/app/scripts/lib/notifications.js
+++ b/app/scripts/lib/notifications.js
@@ -1,25 +1,11 @@
const extension = require('./extension')
const notifications = {
- createUnlockRequestNotification: createUnlockRequestNotification,
- createTxNotification: createTxNotification,
- createMsgNotification: createMsgNotification,
+ show: showNotification,
}
module.exports = notifications
window.METAMASK_NOTIFIER = notifications
-function createUnlockRequestNotification (opts) {
- showNotification()
-}
-
-function createTxNotification (state) {
- showNotification()
-}
-
-function createMsgNotification (state) {
- showNotification()
-}
-
function showNotification() {
extension.windows.getAll({}, (windows) => {