aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-02-12 22:02:24 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-02-12 22:06:15 +0800
commitf5eb1512d4dd2c521034d121f3de3e7957cfd53e (patch)
tree7f0ca77c2677b9d9cd6b14baed86fb99eaf3013c /app
parent3c915b0d7ff7241c0b3f1b58aadda6da7bcb712d (diff)
downloadtangerine-wallet-browser-f5eb1512d4dd2c521034d121f3de3e7957cfd53e.tar.gz
tangerine-wallet-browser-f5eb1512d4dd2c521034d121f3de3e7957cfd53e.tar.zst
tangerine-wallet-browser-f5eb1512d4dd2c521034d121f3de3e7957cfd53e.zip
Fix all "var used instead of let or const" problems in inpage.js
Diffstat (limited to 'app')
-rw-r--r--app/scripts/inpage.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index f8c6cf573..fb2a84d1a 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -42,13 +42,13 @@ function onMessage (messageType, handler, remove) {
//
// setup background connection
-var metamaskStream = new LocalMessageDuplexStream({
+const metamaskStream = new LocalMessageDuplexStream({
name: 'inpage',
target: 'contentscript',
})
// compose the inpage provider
-var inpageProvider = new MetamaskInpageProvider(metamaskStream)
+const inpageProvider = new MetamaskInpageProvider(metamaskStream)
// set a high max listener count to avoid unnecesary warnings
inpageProvider.setMaxListeners(100)
@@ -181,7 +181,7 @@ if (typeof window.web3 !== 'undefined') {
and try again.`)
}
-var web3 = new Web3(proxiedInpageProvider)
+const web3 = new Web3(proxiedInpageProvider)
web3.setProvider = function () {
log.debug('MetaMask - overrode web3.setProvider')
}
@@ -218,7 +218,7 @@ inpageProvider.publicConfigStore.subscribe(function (state) {
// need to make sure we aren't affected by overlapping namespaces
// and that we dont affect the app with our namespace
// mostly a fix for web3's BigNumber if AMD's "define" is defined...
-var __define
+let __define
/**
* Caches reference to global define object and deletes it to