Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"react-native-launch-arguments": "^4.0.2",
"react-native-localize": "^2.2.6",
"react-native-modal": "^13.0.0",
"react-native-onyx": "2.0.81",
"react-native-onyx": "2.0.82",
"react-native-pager-view": "6.5.0",
"react-native-pdf": "6.7.3",
"react-native-performance": "^5.1.0",
Expand Down
6 changes: 4 additions & 2 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6230,9 +6230,11 @@ function getSendMoneyParams(
},
);

if (optimisticChatReportActionsData.value) {
const optimisticChatReportActionsValue = optimisticChatReportActionsData.value as Record<string, OnyxTypes.ReportAction>;

if (optimisticChatReportActionsValue) {
// Add an optimistic created action to the optimistic chat reportActions data
optimisticChatReportActionsData.value[optimisticCreatedActionForChat.reportActionID] = optimisticCreatedActionForChat;
optimisticChatReportActionsValue[optimisticCreatedActionForChat.reportActionID] = optimisticCreatedActionForChat;
}
} else {
failureData.push({
Expand Down
6 changes: 4 additions & 2 deletions tests/actions/ReportTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,10 @@ describe('actions/Report', () => {
jest.advanceTimersByTime(10);
reportActionCreatedDate = DateUtils.getDBTime();

if (optimisticReportActions.value?.[400]) {
optimisticReportActions.value[400].created = reportActionCreatedDate;
const optimisticReportActionsValue = optimisticReportActions.value as Record<string, OnyxTypes.ReportAction>;

if (optimisticReportActionsValue?.[400]) {
optimisticReportActionsValue[400].created = reportActionCreatedDate;
}

// When we emit the events for these pending created actions to update them to not pending
Expand Down