mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
delete web3.metamassk.watchAsset
This commit is contained in:
parent
b59a1e91b8
commit
053e262ae7
@ -14,23 +14,6 @@ function setupDappAutoReload (web3, observable) {
|
|||||||
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')
|
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
|
hasBeenWarned = true
|
||||||
}
|
}
|
||||||
// setup wallet
|
|
||||||
if (key === 'metamask') {
|
|
||||||
return {
|
|
||||||
watchAsset: (params) => {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
web3.currentProvider.sendAsync({
|
|
||||||
jsonrpc: '2.0',
|
|
||||||
method: 'metamask_watchAsset',
|
|
||||||
params,
|
|
||||||
}, (err, res) => {
|
|
||||||
if (err) reject(err)
|
|
||||||
resolve(res)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// get the time of use
|
// get the time of use
|
||||||
lastTimeUsed = Date.now()
|
lastTimeUsed = Date.now()
|
||||||
// return value normally
|
// return value normally
|
||||||
|
Loading…
x
Reference in New Issue
Block a user