Skip to content

Commit 0c48eec

Browse files
Merge pull request Expensify#78347 from paulnjs/paulnjs-fix/76807
fix: Scan-Receipt is not removed when navigate to multi selection scan mode
2 parents 4c76fb5 + 93c6911 commit 0c48eec

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/pages/iou/request/step/IOURequestStepScan/index.native.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,10 +795,9 @@ function IOURequestStepScan({
795795
if (!dismissedProductTraining?.[CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.MULTI_SCAN_EDUCATIONAL_MODAL]) {
796796
setShouldShowMultiScanEducationalPopup(true);
797797
}
798-
if (isMultiScanEnabled) {
799-
removeDraftTransactions(true);
800-
}
798+
801799
removeTransactionReceipt(CONST.IOU.OPTIMISTIC_TRANSACTION_ID);
800+
removeDraftTransactions(true);
802801
setIsMultiScanEnabled?.(!isMultiScanEnabled);
803802
};
804803

src/pages/iou/request/step/IOURequestStepScan/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,10 +796,8 @@ function IOURequestStepScan({
796796
if (!dismissedProductTraining?.[CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.MULTI_SCAN_EDUCATIONAL_MODAL]) {
797797
setShouldShowMultiScanEducationalPopup(true);
798798
}
799-
if (isMultiScanEnabled) {
800-
removeDraftTransactions(true);
801-
}
802799
removeTransactionReceipt(CONST.IOU.OPTIMISTIC_TRANSACTION_ID);
800+
removeDraftTransactions(true);
803801
setIsMultiScanEnabled?.(!isMultiScanEnabled);
804802
};
805803

0 commit comments

Comments
 (0)