Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
fix: Update isValidMessage() check for Safe Apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Sánchez committed May 25, 2022
1 parent 7a6792a commit 1f8e7c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/routes/safe/components/Apps/communicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class AppCommunicator {
return true
}

// @ts-expect-error .parent doesn't exist on some possible types
const sentFromIframe = msg.source.parent === window.parent
const sentFromIframe = this.iframeRef.current?.contentWindow === msg.source
const knownMethod = Object.values(Methods).includes(msg.data.method)

return sentFromIframe && knownMethod
Expand Down

0 comments on commit 1f8e7c3

Please sign in to comment.