diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-12 21:57:03 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-12 22:06:15 +0800 |
commit | 969cf73fae4073f48a6491d3768d68ce64caeff9 (patch) | |
tree | 0b9e5b3fd3d777ef55d16fe757ae2e9270d6dedc | |
parent | 7f9d8de4ce6bad31a1a59b4afeb7bc0528b29433 (diff) | |
download | tangerine-wallet-browser-969cf73fae4073f48a6491d3768d68ce64caeff9.tar tangerine-wallet-browser-969cf73fae4073f48a6491d3768d68ce64caeff9.tar.gz tangerine-wallet-browser-969cf73fae4073f48a6491d3768d68ce64caeff9.tar.bz2 tangerine-wallet-browser-969cf73fae4073f48a6491d3768d68ce64caeff9.tar.lz tangerine-wallet-browser-969cf73fae4073f48a6491d3768d68ce64caeff9.tar.xz tangerine-wallet-browser-969cf73fae4073f48a6491d3768d68ce64caeff9.tar.zst tangerine-wallet-browser-969cf73fae4073f48a6491d3768d68ce64caeff9.zip |
Fix all "var used instead of let or const" problems in background.js
-rw-r--r-- | app/scripts/background.js | 14 |
1 files changed, 7 insertions, 7 deletions
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() |