diff options
author | kumavis <aaron@kumavis.me> | 2017-11-29 05:09:18 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2017-11-29 05:09:18 +0800 |
commit | f64bc3c01afa688ee4eb4ea681bca0d9a95f0300 (patch) | |
tree | 5cfc8816719e5645cb8ac0108effc11f2c577bb8 /app/scripts/lib | |
parent | e71115735c9b9d34fe85bc9e644f3b910bdaa014 (diff) | |
download | tangerine-wallet-browser-f64bc3c01afa688ee4eb4ea681bca0d9a95f0300.tar.gz tangerine-wallet-browser-f64bc3c01afa688ee4eb4ea681bca0d9a95f0300.tar.zst tangerine-wallet-browser-f64bc3c01afa688ee4eb4ea681bca0d9a95f0300.zip |
deps - obs-store@3 + migrate stream plumbing
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/inpage-provider.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index da75c4be2..99cc5d2cf 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -3,6 +3,7 @@ const RpcEngine = require('json-rpc-engine') const createIdRemapMiddleware = require('json-rpc-engine/src/idRemapMiddleware') const createStreamMiddleware = require('json-rpc-middleware-stream') const LocalStorageStore = require('obs-store') +const asStream = require('obs-store/lib/asStream') const ObjectMultiplex = require('obj-multiplex') module.exports = MetamaskInpageProvider @@ -21,9 +22,10 @@ function MetamaskInpageProvider (connectionStream) { // subscribe to metamask public config (one-way) self.publicConfigStore = new LocalStorageStore({ storageKey: 'MetaMask-Config' }) + pump( mux.createStream('publicConfig'), - self.publicConfigStore, + asStream(self.publicConfigStore), (err) => logStreamDisconnectWarning('MetaMask PublicConfigStore', err) ) |