-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: delete money request if failed to create chat #44142
Merged
neil-marcellini
merged 23 commits into
Expensify:main
from
dominictb:fix/42950-clean-dist-req-error
Jul 17, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
dcc9ac9
fix: delete money request if failed to create chat
dominictb ed0b37e
fix: add function to swap err message for local translation
dominictb caae66e
Merge remote-tracking branch 'origin/main' into fix/42950-clean-dist-…
dominictb 7936055
fix: lint and prettier
dominictb 68c4ca7
fix: check optimistic report before cleaning up money request
dominictb 083c790
chore: add translation
dominictb 5951c38
fix: lint
dominictb 7a9c89b
Merge remote-tracking branch 'origin/main' into fix/42950-clean-dist-…
dominictb b383383
fix: improve translation key swapping logic
dominictb 65bd81d
fix: comment
dominictb 9b67b44
Merge remote-tracking branch 'origin/main' into fix/42950-clean-dist-…
dominictb 041bed4
fix: set errors and IOUTransactionID to null
dominictb 41768f4
fix: typescript issue
dominictb bd32dd9
Merge remote-tracking branch 'origin/main' into fix/42950-clean-dist-…
dominictb 0590632
fix: resolve typescript issues
dominictb 21eafea
fix: prettier
dominictb 3730797
fix: update comments and clean up implementation
dominictb 83c0c3f
Merge remote-tracking branch 'origin/main' into fix/42950-clean-dist-…
dominictb 51b8106
Merge remote-tracking branch 'origin/main' into fix/42950-clean-dist-…
dominictb 4b79f38
fix: revert "swapForTranslation" change
dominictb 313b1ca
Merge remote-tracking branch 'origin/main' into fix/42950-clean-dist-…
dominictb 6ea8fc6
Remove en translation messsage
dominictb d71f595
Remove es translation message
dominictb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -410,6 +410,14 @@ function MoneyRequestView({ | |
if (!transaction?.transactionID) { | ||
return; | ||
} | ||
|
||
const isCreateChatErrored = !!report?.errorFields?.createChat; | ||
if ((isCreateChatErrored || !!report.isOptimisticReport) && parentReportAction) { | ||
const urlToNavigateBack = IOU.cleanUpMoneyRequest(transaction.transactionID, parentReportAction, true); | ||
Navigation.goBack(urlToNavigateBack); | ||
Comment on lines
+416
to
+417
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI, this caused the following issue: #50022 |
||
return; | ||
} | ||
|
||
if (transaction.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) { | ||
if (chatReport?.reportID && ReportUtils.getAddWorkspaceRoomOrChatReportErrors(chatReport)) { | ||
Report.navigateToConciergeChatAndDeleteReport(chatReport.reportID, true, true); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused a regression here, more details: #46662 (comment)