Use filter subprovider in-page to avoid filter leaks

feature/default_network_editable
Dan Finlay 8 years ago
parent 709c0eb307
commit 48d9a21071
  1. 8
      app/scripts/lib/inpage-provider.js
  2. 2
      package.json

@ -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…
Cancel
Save