From 969cf73fae4073f48a6491d3768d68ce64caeff9 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Tue, 12 Feb 2019 10:27:03 -0330 Subject: Fix all "var used instead of let or const" problems in background.js --- app/scripts/background.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/scripts/background.js b/app/scripts/background.js index 6056962dd..8cc60be80 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -421,13 +421,13 @@ function setupController (initState, initLangCode) { * The number reflects the current number of pending transactions or message signatures needing user approval. */ function updateBadge () { - var label = '' - var unapprovedTxCount = controller.txController.getUnapprovedTxCount() - var unapprovedMsgCount = controller.messageManager.unapprovedMsgCount - var unapprovedPersonalMsgs = controller.personalMessageManager.unapprovedPersonalMsgCount - var unapprovedTypedMsgs = controller.typedMessageManager.unapprovedTypedMessagesCount + let label = '' + const unapprovedTxCount = controller.txController.getUnapprovedTxCount() + const unapprovedMsgCount = controller.messageManager.unapprovedMsgCount + const unapprovedPersonalMsgs = controller.personalMessageManager.unapprovedPersonalMsgCount + const unapprovedTypedMsgs = controller.typedMessageManager.unapprovedTypedMessagesCount const pendingProviderRequests = controller.providerApprovalController.store.getState().providerRequests.length - var count = unapprovedTxCount + unapprovedMsgCount + unapprovedPersonalMsgs + unapprovedTypedMsgs + pendingProviderRequests + const count = unapprovedTxCount + unapprovedMsgCount + unapprovedPersonalMsgs + unapprovedTypedMsgs + pendingProviderRequests if (count) { label = String(count) } @@ -463,7 +463,7 @@ function openPopup () { triggerUi() return new Promise( (resolve) => { - var interval = setInterval(() => { + const interval = setInterval(() => { if (!notificationIsOpen) { clearInterval(interval) resolve() -- cgit v1.2.3