mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use filter subprovider in-page to avoid filter leaks
This commit is contained in:
parent
709c0eb307
commit
48d9a21071
@ -1,6 +1,7 @@
|
||||
const pipe = require('pump')
|
||||
const StreamSubprovider = require('web3-stream-provider/stream-subprovider')
|
||||
const ProviderEngine = require('web3-provider-engine')
|
||||
const FilterSubprovider = require('web3-provider-engine/subproviders/filters')
|
||||
const StreamSubprovider = require('web3-stream-provider/stream-subprovider')
|
||||
const LocalStorageStore = require('obs-store')
|
||||
const ObjectMultiplex = require('./obj-multiplex')
|
||||
const createRandomId = require('./random-id')
|
||||
@ -28,7 +29,10 @@ function MetamaskInpageProvider (connectionStream) {
|
||||
)
|
||||
|
||||
// connect to async provider
|
||||
const engine = self.asyncProvider = new ProviderEngine()
|
||||
const engine = new ProviderEngine()
|
||||
|
||||
const filterSubprovider = new FilterSubprovider()
|
||||
engine.addProvider(filterSubprovider)
|
||||
|
||||
const stream = self.stream = new StreamSubprovider()
|
||||
engine.addProvider(stream)
|
||||
|
@ -122,7 +122,7 @@
|
||||
"vreme": "^3.0.2",
|
||||
"web3": "0.18.2",
|
||||
"web3-provider-engine": "^12.0.6",
|
||||
"web3-stream-provider": "^2.0.6",
|
||||
"web3-stream-provider": "^3.0.0",
|
||||
"xtend": "^4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
Loading…
Reference in New Issue
Block a user