Skip to content

Commit 8b9e40f

Browse files
Preserve return value
1 parent 0e9b038 commit 8b9e40f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/snaps-controllers/src/services/AbstractExecutionService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,14 @@ export abstract class AbstractExecutionService<WorkerType>
322322
rpcStream.write = (chunk, encoding, callback) => {
323323
// Ignore chain switching notifications as it doesn't matter for the SnapProvider.
324324
if (chunk?.data?.method === 'metamask_chainChanged') {
325-
return;
325+
return true;
326326
}
327327

328328
if (chunk?.data && hasProperty(chunk?.data, 'id')) {
329329
this.#messenger.publish('ExecutionService:outboundResponse', snapId);
330330
}
331331

332-
originalWrite(chunk, encoding, callback);
332+
return originalWrite(chunk, encoding, callback);
333333
};
334334

335335
// Typecast: stream type mismatch

0 commit comments

Comments
 (0)