add deprecation warning for web3

This commit is contained in:
frankiebee 2017-08-11 15:52:03 -07:00
parent 4b7fa27ad0
commit ac9e84ff40
1 changed files with 4 additions and 1 deletions

View File

@ -5,7 +5,10 @@ function setupDappAutoReload (web3, observable) {
global.web3 = new Proxy(web3, {
get: (_web3, name) => {
// get the time of use
if (name !== '_used') _web3._used = Date.now()
if (name !== '_used') {
console.warn('MetaMask: web3 will be deprecated in the future in favor of the ethereumProvider \nhttps://github.com/ethereum/mist/releases/tag/v0.9.0')
_web3._used = Date.now()
}
return _web3[name]
},
set: (_web3, name, value) => {