aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorPaul Bouchon <mail@bitpshr.net>2018-09-26 22:48:17 +0800
committerGitHub <noreply@github.com>2018-09-26 22:48:17 +0800
commit9359fc875df061c39807d90c3ca92356960ec4c3 (patch)
tree34926a3686adaa6bfc8fd838a09e1ccb071e4985 /app
parent13348961e5ac8564c08b8f5481d4d76c160ad876 (diff)
downloadtangerine-wallet-browser-9359fc875df061c39807d90c3ca92356960ec4c3.tar
tangerine-wallet-browser-9359fc875df061c39807d90c3ca92356960ec4c3.tar.gz
tangerine-wallet-browser-9359fc875df061c39807d90c3ca92356960ec4c3.tar.bz2
tangerine-wallet-browser-9359fc875df061c39807d90c3ca92356960ec4c3.tar.lz
tangerine-wallet-browser-9359fc875df061c39807d90c3ca92356960ec4c3.tar.xz
tangerine-wallet-browser-9359fc875df061c39807d90c3ca92356960ec4c3.tar.zst
tangerine-wallet-browser-9359fc875df061c39807d90c3ca92356960ec4c3.zip
EIP-1102: Add deprecation message (#5353)
Diffstat (limited to 'app')
-rw-r--r--app/scripts/inpage.js6
-rw-r--r--app/scripts/lib/auto-reload.js6
2 files changed, 6 insertions, 6 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js
index d9fda1feb..d924be516 100644
--- a/app/scripts/inpage.js
+++ b/app/scripts/inpage.js
@@ -9,6 +9,11 @@ restoreContextAfterImports()
log.setDefaultLevel(process.env.METAMASK_DEBUG ? 'debug' : 'warn')
+console.warn('ATTENTION: In an effort to improve user privacy, MetaMask will ' +
+'stop exposing user accounts to dapps by default beginning November 2nd, 2018. ' +
+'Dapps should call provider.enable() in order to view and use accounts. Please see ' +
+'https://bit.ly/2QQHXvF for complete information and up-to-date example code.')
+
//
// setup plugin communication
//
@@ -52,6 +57,7 @@ if (typeof window.web3 !== 'undefined') {
or MetaMask and another web3 extension. Please remove one
and try again.`)
}
+
var web3 = new Web3(inpageProvider)
web3.setProvider = function () {
log.debug('MetaMask - overrode web3.setProvider')
diff --git a/app/scripts/lib/auto-reload.js b/app/scripts/lib/auto-reload.js
index cce31c3d2..558391a06 100644
--- a/app/scripts/lib/auto-reload.js
+++ b/app/scripts/lib/auto-reload.js
@@ -2,18 +2,12 @@ module.exports = setupDappAutoReload
function setupDappAutoReload (web3, observable) {
// export web3 as a global, checking for usage
- let hasBeenWarned = false
let reloadInProgress = false
let lastTimeUsed
let lastSeenNetwork
global.web3 = new Proxy(web3, {
get: (_web3, key) => {
- // show warning once on web3 access
- if (!hasBeenWarned && key !== 'currentProvider') {
- console.warn('MetaMask: web3 will be deprecated in the near future in favor of the ethereumProvider \nhttps://github.com/MetaMask/faq/blob/master/detecting_metamask.md#web3-deprecation')
- hasBeenWarned = true
- }
// get the time of use
lastTimeUsed = Date.now()
// return value normally