diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-05-23 06:23:29 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-05-23 06:23:29 +0800 |
commit | 48d9a2107130e3850077c6c1789b29a09634b168 (patch) | |
tree | b77a881766e3d620b563f8c4b1b151dbb6d796fa /app | |
parent | 709c0eb307e2cda9aa16b67191a43e99e1b22fa0 (diff) | |
download | tangerine-wallet-browser-48d9a2107130e3850077c6c1789b29a09634b168.tar tangerine-wallet-browser-48d9a2107130e3850077c6c1789b29a09634b168.tar.gz tangerine-wallet-browser-48d9a2107130e3850077c6c1789b29a09634b168.tar.bz2 tangerine-wallet-browser-48d9a2107130e3850077c6c1789b29a09634b168.tar.lz tangerine-wallet-browser-48d9a2107130e3850077c6c1789b29a09634b168.tar.xz tangerine-wallet-browser-48d9a2107130e3850077c6c1789b29a09634b168.tar.zst tangerine-wallet-browser-48d9a2107130e3850077c6c1789b29a09634b168.zip |
Use filter subprovider in-page to avoid filter leaks
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/inpage-provider.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index 88d81cca5..9dea05dbb 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -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) |