Skip to content

Commit

Permalink
lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed May 29, 2024
1 parent e489bef commit ca52ccb
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5004,18 +5004,24 @@ export default class MetamaskController extends EventEmitter {

const connectionId = this.addConnection(origin, { engine });

pipeline(outStream, dupeReqFilterStream, providerStream, outStream, (err) => {
// handle any middleware cleanup
engine._middleware.forEach((mid) => {
if (mid.destroy && typeof mid.destroy === 'function') {
mid.destroy();
pipeline(
outStream,
dupeReqFilterStream,
providerStream,
outStream,
(err) => {
// handle any middleware cleanup
engine._middleware.forEach((mid) => {
if (mid.destroy && typeof mid.destroy === 'function') {
mid.destroy();
}
});
connectionId && this.removeConnection(origin, connectionId);
if (err) {
log.error(err);
}
});
connectionId && this.removeConnection(origin, connectionId);
if (err) {
log.error(err);
}
});
},
);
}

///: BEGIN:ONLY_INCLUDE_IF(snaps)
Expand Down

0 comments on commit ca52ccb

Please sign in to comment.