diff options
author | Hsuan Lee <boczeratul@gmail.com> | 2018-10-23 13:54:39 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2018-12-10 18:19:32 +0800 |
commit | d1409b4f746baafdc6c5efc82c783a9fd1724de6 (patch) | |
tree | 137948cf01496673cf3984d52db2681f8aebfc40 | |
parent | 6929ea977cdf598cc10200fc846215d13da27af6 (diff) | |
download | dexon-wallet-d1409b4f746baafdc6c5efc82c783a9fd1724de6.tar.gz dexon-wallet-d1409b4f746baafdc6c5efc82c783a9fd1724de6.tar.zst dexon-wallet-d1409b4f746baafdc6c5efc82c783a9fd1724de6.zip |
Fix stream name
-rw-r--r-- | app/scripts/contentscript.js | 8 | ||||
-rw-r--r-- | app/scripts/inpage.js | 4 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 4 | ||||
-rw-r--r-- | app/scripts/phishing-detect.js | 2 | ||||
-rw-r--r-- | app/scripts/popup-core.js | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 16317e75..ce5dc4e3 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -53,10 +53,10 @@ function injectScript (content) { function setupStreams () { // setup communication to page and plugin const pageStream = new LocalMessageDuplexStream({ - name: 'contentscript', - target: 'inpage', + name: 'dekuSanContentscript', + target: 'dekuSanInpage', }) - const pluginPort = extension.runtime.connect({ name: 'contentscript' }) + const pluginPort = extension.runtime.connect({ name: 'dekuSanContentscript' }) const pluginStream = new PortStream(pluginPort) // Filter out selectedAddress until this origin is enabled @@ -106,7 +106,7 @@ function setupStreams () { ) // connect phishing warning stream - const phishingStream = mux.createStream('phishing') + const phishingStream = mux.createStream('dekuSanPhishing') phishingStream.once('data', redirectToPhishingWarning) // ignore unused channels (handled by background, inpage) diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index ca7c46ee..057d7add 100644 --- a/app/scripts/inpage.js +++ b/app/scripts/inpage.js @@ -29,8 +29,8 @@ function onMessage (messageType, handler, remove) { // setup background connection var dekusanStream = new LocalMessageDuplexStream({ - name: 'inpage', - target: 'contentscript', + name: 'dekuSanInpage', + target: 'dekuSanContentscript', }) // compose the inpage provider diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 4975fafe..20ca6e45 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -1249,7 +1249,7 @@ module.exports = class MetamaskController extends EventEmitter { // setup multiplexing const mux = setupMultiplex(connectionStream) // connect features - this.setupControllerConnection(mux.createStream('controller')) + this.setupControllerConnection(mux.createStream('dekuSanController')) this.setupProviderConnection(mux.createStream('dekuSanProvider'), originDomain) } @@ -1264,7 +1264,7 @@ module.exports = class MetamaskController extends EventEmitter { */ sendPhishingWarning (connectionStream, hostname) { const mux = setupMultiplex(connectionStream) - const phishingStream = mux.createStream('phishing') + const phishingStream = mux.createStream('dekuSanPhishing') phishingStream.write({ hostname }) } diff --git a/app/scripts/phishing-detect.js b/app/scripts/phishing-detect.js index 5ef99f18..55c517ba 100644 --- a/app/scripts/phishing-detect.js +++ b/app/scripts/phishing-detect.js @@ -25,7 +25,7 @@ function start () { const extensionPort = extension.runtime.connect({ name: windowType }) const connectionStream = new PortStream(extensionPort) const mx = setupMultiplex(connectionStream) - setupControllerConnection(mx.createStream('controller'), (err, metaMaskController) => { + setupControllerConnection(mx.createStream('dekuSanController'), (err, metaMaskController) => { if (err) { return } diff --git a/app/scripts/popup-core.js b/app/scripts/popup-core.js index c69c1512..edae3971 100644 --- a/app/scripts/popup-core.js +++ b/app/scripts/popup-core.js @@ -34,7 +34,7 @@ function connectToAccountManager (connectionStream, cb) { // setup multiplexing var mx = setupMultiplex(connectionStream) // connect features - setupControllerConnection(mx.createStream('controller'), cb) + setupControllerConnection(mx.createStream('dekuSanController'), cb) setupWeb3Connection(mx.createStream('dekuSanProvider')) } |