mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
metamask cont - standardize multiplex stream naming
This commit is contained in:
parent
114dae5f80
commit
a265144176
@ -346,23 +346,23 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
}
|
||||
|
||||
// setup multiplexing
|
||||
const mx = setupMultiplex(connectionStream)
|
||||
const mux = setupMultiplex(connectionStream)
|
||||
// connect features
|
||||
this.setupProviderConnection(mx.createStream('provider'), originDomain)
|
||||
this.setupPublicConfig(mx.createStream('publicConfig'))
|
||||
this.setupProviderConnection(mux.createStream('provider'), originDomain)
|
||||
this.setupPublicConfig(mux.createStream('publicConfig'))
|
||||
}
|
||||
|
||||
setupTrustedCommunication (connectionStream, originDomain) {
|
||||
// setup multiplexing
|
||||
const mx = setupMultiplex(connectionStream)
|
||||
const mux = setupMultiplex(connectionStream)
|
||||
// connect features
|
||||
this.setupControllerConnection(mx.createStream('controller'))
|
||||
this.setupProviderConnection(mx.createStream('provider'), originDomain)
|
||||
this.setupControllerConnection(mux.createStream('controller'))
|
||||
this.setupProviderConnection(mux.createStream('provider'), originDomain)
|
||||
}
|
||||
|
||||
sendPhishingWarning (connectionStream, hostname) {
|
||||
const mx = setupMultiplex(connectionStream)
|
||||
const phishingStream = mx.createStream('phishing')
|
||||
const mux = setupMultiplex(connectionStream)
|
||||
const phishingStream = mux.createStream('phishing')
|
||||
phishingStream.write({ hostname })
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user