Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onclose callback #2094

Merged
merged 1 commit into from
Jun 14, 2023
Merged

Onclose callback #2094

merged 1 commit into from
Jun 14, 2023

Conversation

katspaugh
Copy link
Member

If the user closes the tx modal by clicking on the X button, or navigating to another route, the current Safe Apps transaction should be cancelled.

@katspaugh katspaugh requested a review from usame-algan June 14, 2023 10:48
@github-actions
Copy link

github-actions bot commented Jun 14, 2023

Branch preview

✅ Deploy successful!

https://onclose--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@@ -85,7 +84,7 @@ const NewModalDialog = ({
<span style={{ flex: 1 }} />
<IconButton
aria-label="close"
onClick={() => setTxFlow(undefined)}
onClick={(e) => onClose?.(e, 'backdropClick')}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to call onClose with e and backdropClick here even if its not being used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's the signature of that prop inherited from the MUI Dialog.

@katspaugh katspaugh merged commit 83d5e8f into epic-tx-flow Jun 14, 2023
@katspaugh katspaugh deleted the onclose branch June 14, 2023 11:07
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants