Skip to content

Commit

Permalink
Merge pull request #47489 from daledah/fix/47279
Browse files Browse the repository at this point in the history
fix: unable to dismiss deleted rate error
  • Loading branch information
luacmartins authored Aug 19, 2024
2 parents 20c451e + 4e5ff55 commit 7518653
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import * as Member from '@userActions/Policy/Member';
import * as Report from '@userActions/Report';
import * as ReportActions from '@userActions/ReportActions';
import * as Session from '@userActions/Session';
import * as Transaction from '@userActions/Transaction';
import * as User from '@userActions/User';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -921,7 +922,13 @@ function ReportActionItem({
)}
>
<OfflineWithFeedback
onClose={() => ReportActions.clearAllRelatedReportActionErrors(report.reportID, action)}
onClose={() => {
const transactionID = ReportActionsUtils.isMoneyRequestAction(action) ? ReportActionsUtils.getOriginalMessage(action)?.IOUTransactionID : undefined;
if (transactionID) {
Transaction.clearError(transactionID);
}
ReportActions.clearAllRelatedReportActionErrors(report.reportID, action);
}}
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
pendingAction={
draftMessage !== undefined ? undefined : action.pendingAction ?? (action.isOptimisticAction ? CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD : undefined)
Expand Down

0 comments on commit 7518653

Please sign in to comment.