1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #1644 from MetaMask/i1630-badgefix

Fix badge number to include personal_sign
This commit is contained in:
Frankie 2017-06-20 15:58:03 -07:00 committed by GitHub
commit c09564d78a
2 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,7 @@
- Add a warning to JSON file import.
- Fix bug where slowly mined txs would sometimes be incorrectly marked as failed.
- Fix bug where badge count did not reflect personal_sign pending messages.
## 3.7.8 2017-6-12

View File

@ -116,13 +116,15 @@ function setupController (initState) {
updateBadge()
controller.txController.on('updateBadge', updateBadge)
controller.messageManager.on('updateBadge', updateBadge)
controller.personalMessageManager.on('updateBadge', updateBadge)
// plugin badge text
function updateBadge () {
var label = ''
var unapprovedTxCount = controller.txController.unapprovedTxCount
var unapprovedMsgCount = controller.messageManager.unapprovedMsgCount
var count = unapprovedTxCount + unapprovedMsgCount
var unapprovedPersonalMsgs = controller.personalMessageManager.unapprovedPersonalMsgCount
var count = unapprovedTxCount + unapprovedMsgCount + unapprovedPersonalMsgs
if (count) {
label = String(count)
}