File tree Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Original file line number Diff line number Diff line change 1
1
import ObjectMultiplex from '@metamask/object-multiplex' ;
2
2
import { pipeline } from 'readable-stream' ;
3
3
4
- import { EXTENSION_MESSAGES } from '../../../shared/constants/app' ;
5
-
6
4
/**
7
5
* Sets up stream multiplexing for the given stream
8
6
*
@@ -11,12 +9,6 @@ import { EXTENSION_MESSAGES } from '../../../shared/constants/app';
11
9
*/
12
10
export function setupMultiplex ( connectionStream ) {
13
11
const mux = new ObjectMultiplex ( ) ;
14
- /**
15
- * We are using this streams to send keep alive message between backend/ui without setting up a multiplexer
16
- * We need to tell the multiplexer to ignore them, else we get the " orphaned data for stream " warnings
17
- * https://github.com/MetaMask/object-multiplex/blob/280385401de84f57ef57054d92cfeb8361ef2680/src/ObjectMultiplex.ts#L63
18
- */
19
- mux . ignoreStream ( EXTENSION_MESSAGES . CONNECTION_READY ) ;
20
12
pipeline ( connectionStream , mux , connectionStream , ( err ) => {
21
13
// For context and todos related to the error message match, see https://github.com/MetaMask/metamask-extension/issues/26337
22
14
if ( err && ! err . message ?. match ( 'Premature close' ) ) {
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ async function start() {
94
94
95
95
/*
96
96
* In case of MV3 the issue of blank screen was very frequent, it is caused by UI initialising before background is ready to send state.
97
- * Code below ensures that UI is rendered only after "CONNECTION_READY" or " startUISync"
97
+ * Code below ensures that UI is rendered only after "startUISync"
98
98
* messages are received thus the background is ready, and ensures that streams and
99
99
* phishing warning page load only after the "startUISync" message is received.
100
100
* In case the UI is already rendered, only update the streams.
Original file line number Diff line number Diff line change @@ -82,7 +82,6 @@ export const SMART_TRANSACTION_CONFIRMATION_TYPES = {
82
82
* Custom messages to send and be received by the extension
83
83
*/
84
84
export const EXTENSION_MESSAGES = {
85
- CONNECTION_READY : 'CONNECTION_READY' ,
86
85
READY : 'METAMASK_EXTENSION_READY' ,
87
86
} as const ;
88
87
You can’t perform that action at this time.
0 commit comments