Skip to content

Commit

Permalink
fix: don't close flow in Safe Apps (#2333)
Browse files Browse the repository at this point in the history
* fix: don't close flow in Safe Apps

* fix: dependencies
  • Loading branch information
iamacook authored Aug 1, 2023
1 parent 793cd98 commit 1a48103
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/safe-apps/AppFrame/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,23 +260,21 @@ const AppFrame = ({ appUrl, allowedFeaturesList }: AppFrameProps): ReactElement
if (safeAppRequestId && currentRequestId === safeAppRequestId) {
trackSafeAppEvent(SAFE_APPS_EVENTS.PROPOSE_TRANSACTION, appName)
communicator?.send({ safeTxHash }, safeAppRequestId)
setTxFlow(undefined)
}
})

return unsubscribe
}, [appName, chainId, communicator, currentRequestId, setTxFlow])
}, [appName, chainId, communicator, currentRequestId])

useEffect(() => {
const unsubscribe = safeMsgSubscribe(SafeMsgEvent.SIGNATURE_PREPARED, ({ messageHash, requestId, signature }) => {
if (requestId && currentRequestId === requestId) {
communicator?.send({ messageHash, signature }, requestId)
setTxFlow(undefined)
}
})

return unsubscribe
}, [communicator, currentRequestId, setTxFlow])
}, [communicator, currentRequestId])

if (!safeLoaded) {
return <div />
Expand Down

0 comments on commit 1a48103

Please sign in to comment.