Skip to content

Commit

Permalink
fix: remove variable and remove unused export
Browse files Browse the repository at this point in the history
  • Loading branch information
truph01 committed Dec 9, 2024
1 parent cc1ef7f commit f104ffd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5689,15 +5689,15 @@ function cleanUpMoneyRequest(transactionID: string, reportAction: OnyxTypes.Repo
// build Onyx data

// Onyx operations to delete the transaction, update the IOU report action and chat report action
const onyxUpdatesActions: OnyxUpdate[] = [];
const reportActionsOnyxUpdates: OnyxUpdate[] = [];
const onyxUpdates: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`,
value: null,
},
];
onyxUpdatesActions.push({
reportActionsOnyxUpdates.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport?.reportID}`,
value: {
Expand All @@ -5710,7 +5710,7 @@ function cleanUpMoneyRequest(transactionID: string, reportAction: OnyxTypes.Repo
});

if (reportPreviewAction?.reportActionID) {
onyxUpdatesActions.push({
reportActionsOnyxUpdates.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${chatReport?.reportID}`,
value: {
Expand Down Expand Up @@ -5747,7 +5747,7 @@ function cleanUpMoneyRequest(transactionID: string, reportAction: OnyxTypes.Repo
}

// added operations to update IOU report and chat report
onyxUpdatesActions.push({
reportActionsOnyxUpdates.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport?.reportID}`,
value: updatedReportAction,
Expand Down Expand Up @@ -5804,7 +5804,7 @@ function cleanUpMoneyRequest(transactionID: string, reportAction: OnyxTypes.Repo
}

// First, update the reportActions to ensure related actions are not displayed.
Onyx.update(onyxUpdatesActions).then(() => {
Onyx.update(reportActionsOnyxUpdates).then(() => {
Navigation.goBack(urlToNavigateBack);
InteractionManager.runAfterInteractions(() => {
// After navigation, update the remaining data.
Expand Down Expand Up @@ -8672,7 +8672,6 @@ export {
completePaymentOnboarding,
payInvoice,
payMoneyRequest,
prepareToCleanUpMoneyRequest,
putOnHold,
replaceReceipt,
requestMoney,
Expand Down

0 comments on commit f104ffd

Please sign in to comment.