1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

inpage - distinguish pump vs pipe

This commit is contained in:
kumavis 2017-09-07 21:19:24 -07:00
parent 57e4805c62
commit 0e8e655fdb

View File

@ -1,4 +1,4 @@
const pipe = require('pump')
const pump = require('pump')
const RpcEngine = require('json-rpc-engine')
const createIdRemapMiddleware = require('json-rpc-engine/src/idRemapMiddleware')
const createStreamMiddleware = require('json-rpc-middleware-stream')
@ -12,7 +12,7 @@ function MetamaskInpageProvider (connectionStream) {
// setup connectionStream multiplexing
var multiStream = self.multiStream = ObjectMultiplex()
pipe(
pump(
connectionStream,
multiStream,
connectionStream,
@ -21,7 +21,7 @@ function MetamaskInpageProvider (connectionStream) {
// subscribe to metamask public config (one-way)
self.publicConfigStore = new LocalStorageStore({ storageKey: 'MetaMask-Config' })
pipe(
pump(
multiStream.createStream('publicConfig'),
self.publicConfigStore,
(err) => logStreamDisconnectWarning('MetaMask PublicConfigStore', err)
@ -32,7 +32,7 @@ function MetamaskInpageProvider (connectionStream) {
// connect to async provider
const streamMiddleware = createStreamMiddleware()
pipe(
pump(
streamMiddleware.stream,
multiStream.createStream('provider'),
streamMiddleware.stream,