Skip to content

Commit 221699f

Browse files
fix(dapp-client): tighten transport message source validation
1 parent f5f6a7a commit 221699f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

packages/wallet/dapp-client/src/DappTransport.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,7 @@ export class DappTransport {
378378
return
379379
}
380380

381-
const isPotentiallyValidSource =
382-
this.walletWindow && (event.source === this.walletWindow || !this.walletWindow.closed)
383-
384-
if (!isPotentiallyValidSource && event.data?.type !== MessageType.WALLET_OPENED) {
381+
if (!this.walletWindow || event.source !== this.walletWindow) {
385382
return
386383
}
387384

0 commit comments

Comments
 (0)