Skip to content

Commit

Permalink
Add logs to SnapWebviewPostMessageStream
Browse files Browse the repository at this point in the history
  • Loading branch information
gantunesr committed Dec 14, 2022
1 parent 9b94d26 commit cd822dc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/components/Views/Wallet/SnapWebviewPostMessageStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,24 @@ export default class SnapWebviewPostMessageStream extends BasePostMessageStream
}

protected _postMessage(data: unknown): void {
// eslint-disable-next-line no-console
console.log(
'[SNAP STREAM LOG] SnapWebviewPostMessageStream+_postMessage: Write data',
);
this._stream.write(data);
}

private _onMessage(data: any): void {
// eslint-disable-next-line no-console
console.log(
'[SNAP STREAM LOG] SnapWebviewPostMessageStream+_onMessage: Listen for data',
);
this._onData(data);
}

destroy(): void {
// eslint-disable-next-line no-console
console.log('TO DO: Destroy stream from SnapWebviewPostMessageStream');
this.destroyed = true;
}
}

0 comments on commit cd822dc

Please sign in to comment.