diff options
author | Frankie <frankie.diamond@gmail.com> | 2017-01-28 08:11:59 +0800 |
---|---|---|
committer | Frankie <frankie.diamond@gmail.com> | 2017-01-29 12:28:20 +0800 |
commit | 8be68575bbef1dcc89b51355abaee90dbf018387 (patch) | |
tree | c8da5e217b838bff46bcc9ddfb8300133022ca91 /app/scripts/background.js | |
parent | a8ed780d9b3659474c59c7856ab2ee1430c17b42 (diff) | |
download | tangerine-wallet-browser-8be68575bbef1dcc89b51355abaee90dbf018387.tar tangerine-wallet-browser-8be68575bbef1dcc89b51355abaee90dbf018387.tar.gz tangerine-wallet-browser-8be68575bbef1dcc89b51355abaee90dbf018387.tar.bz2 tangerine-wallet-browser-8be68575bbef1dcc89b51355abaee90dbf018387.tar.lz tangerine-wallet-browser-8be68575bbef1dcc89b51355abaee90dbf018387.tar.xz tangerine-wallet-browser-8be68575bbef1dcc89b51355abaee90dbf018387.tar.zst tangerine-wallet-browser-8be68575bbef1dcc89b51355abaee90dbf018387.zip |
Clean up message manger includes:
Provider egine bump
Remove presence of message manger in keyring controller
Change the status wording fom conf to approved
make Message manager a class
fix messages not being apart of the badge
re write message manger to better reflect controller pattern
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index da9c4f24b..2e5a992b9 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -8,7 +8,6 @@ const Migrator = require('./lib/migrator/') const migrations = require('./migrations/') const PortStream = require('./lib/port-stream.js') const notification = require('./lib/notifications.js') -const messageManager = require('./lib/message-manager') const MetamaskController = require('./metamask-controller') const extension = require('./lib/extension') const firstTimeState = require('./first-time-state') @@ -112,14 +111,14 @@ function setupController (initState) { updateBadge() controller.txManager.on('updateBadge', updateBadge) + controller.messageManager.on('updateBadge', updateBadge) // plugin badge text function updateBadge () { var label = '' var unapprovedTxCount = controller.txManager.unapprovedTxCount - var unconfMsgs = messageManager.unconfirmedMsgs() - var unconfMsgLen = Object.keys(unconfMsgs).length - var count = unapprovedTxCount + unconfMsgLen + var unapprovedMsgCount = controller.messageManager.unapprovedMsgCount + var count = unapprovedTxCount + unapprovedMsgCount if (count) { label = String(count) } @@ -145,4 +144,4 @@ extension.runtime.onInstalled.addListener(function (details) { if ((details.reason === 'install') && (!METAMASK_DEBUG)) { extension.tabs.create({url: 'https://metamask.io/#how-it-works'}) } -})
\ No newline at end of file +}) |