aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-09-08 13:47:08 +0800
committerkumavis <aaron@kumavis.me>2017-09-08 13:47:08 +0800
commitef3bf810bf14da6651ef849e481eb0253be3c8d1 (patch)
tree2ca137981f239953662c04afb1962a6725b0f709 /app/scripts
parent671dafea9e8d379578c73672ba051205456219e3 (diff)
downloadtangerine-wallet-browser-ef3bf810bf14da6651ef849e481eb0253be3c8d1.tar
tangerine-wallet-browser-ef3bf810bf14da6651ef849e481eb0253be3c8d1.tar.gz
tangerine-wallet-browser-ef3bf810bf14da6651ef849e481eb0253be3c8d1.tar.bz2
tangerine-wallet-browser-ef3bf810bf14da6651ef849e481eb0253be3c8d1.tar.lz
tangerine-wallet-browser-ef3bf810bf14da6651ef849e481eb0253be3c8d1.tar.xz
tangerine-wallet-browser-ef3bf810bf14da6651ef849e481eb0253be3c8d1.tar.zst
tangerine-wallet-browser-ef3bf810bf14da6651ef849e481eb0253be3c8d1.zip
inpage - use obj-multiplex module
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/lib/inpage-provider.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js
index db46e4f17..b2515bfb8 100644
--- a/app/scripts/lib/inpage-provider.js
+++ b/app/scripts/lib/inpage-provider.js
@@ -3,7 +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 ObjectMultiplex = require('./obj-multiplex')
+const ObjectMultiplex = require('obj-multiplex')
module.exports = MetamaskInpageProvider
@@ -11,10 +11,10 @@ function MetamaskInpageProvider (connectionStream) {
const self = this
// setup connectionStream multiplexing
- var multiStream = self.multiStream = ObjectMultiplex()
+ const mux = self.mux = new ObjectMultiplex()
pump(
connectionStream,
- multiStream,
+ mux,
connectionStream,
(err) => logStreamDisconnectWarning('MetaMask', err)
)
@@ -22,19 +22,19 @@ function MetamaskInpageProvider (connectionStream) {
// subscribe to metamask public config (one-way)
self.publicConfigStore = new LocalStorageStore({ storageKey: 'MetaMask-Config' })
pump(
- multiStream.createStream('publicConfig'),
+ mux.createStream('publicConfig'),
self.publicConfigStore,
(err) => logStreamDisconnectWarning('MetaMask PublicConfigStore', err)
)
// ignore phishing warning message (handled elsewhere)
- multiStream.ignoreStream('phishing')
+ mux.ignoreStream('phishing')
// connect to async provider
const streamMiddleware = createStreamMiddleware()
pump(
streamMiddleware.stream,
- multiStream.createStream('provider'),
+ mux.createStream('provider'),
streamMiddleware.stream,
(err) => logStreamDisconnectWarning('MetaMask RpcProvider', err)
)