Skip to content

Comments

IOURequestStepScan clean-up, phase 2: Extract shared business logic into useReceiptScan hook #82130

Merged
roryabraham merged 24 commits intoExpensify:mainfrom
samranahm:79929/IOURequestStepScan-clean-up-p2
Feb 21, 2026
Merged

IOURequestStepScan clean-up, phase 2: Extract shared business logic into useReceiptScan hook #82130
roryabraham merged 24 commits intoExpensify:mainfrom
samranahm:79929/IOURequestStepScan-clean-up-p2

Conversation

@samranahm
Copy link
Contributor

@samranahm samranahm commented Feb 11, 2026

Explanation of Change

Fixed Issues

$ #79929
PROPOSAL: N/A

Tests

Test 01

  1. Open the app on Web (Desktop).
  2. Navigate to Create Expense > Scan > Choose File, then select a receipt to upload.
  3. Verify the receipt is uploaded and the app navigates to the "Confirm details" page.
  4. Select a category and click the "Create expense" button.
  5. Verify the "Allow location access" modal appears. Close the modal with any option and verify the expense is created.
  6. Navigate to Create Expense > Scan, then drag and drop a receipt.
  7. Verify the receipt is uploaded and the app navigates to the "Confirm details" page.
  8. Select a category and complete the create expense flow.
  9. Open an existing expense with a receipt and drag a new receipt onto it.
  10. Verify that the "Add attachment" and "Replace receipt" modals appear.
  11. Drop the receipt onto "Replace receipt" and verify the receipt is replaced.

Test 02

  1. Open the app on a native device.
  2. Tap the camera icon to start the create expense flow.
  3. Take a photo of a receipt or choose one from files.
  4. After taking a picture or selecting a receipt, verify the app navigates to the "Confirm details" page.
  5. Tap "Create expense" and verify the expense is created.
  6. Tap Create Expense > Scan, then tap the receipt icon in the lower-left corner to enable multi-scan.
  7. Verify the confirmation modal appears when enabling multi-scan for the first time.
  8. Close the modal and verify the "Confirm details" page is displayed.
  9. Take pictures of multiple receipts and tap the right arrow icon.
  10. Verify that each transaction has its corresponding receipt.
    • Verify that no errors appear in the JS console

Offline tests

QA Steps

Same as test
// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android.Native.mp4
Android: mWeb Chrome
Android.mWeb.Chrome.mp4
iOS: Native
IOS.Native.mp4
iOS: mWeb Safari
IOS.mWeb.Safari.mp4
MacOS: Chrome / Safari
macOS.Chrome.mp4

Copilot AI review requested due to automatic review settings February 11, 2026 13:48
@samranahm samranahm requested review from a team as code owners February 11, 2026 13:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors IOURequestStepScan by extracting shared “receipt scan / upload” business logic into a new useReceiptScan hook to reduce duplication between web and native implementations.

Changes:

  • Added useReceiptScan hook to centralize Onyx subscriptions, confirmation navigation, multi-scan toggling, and file validation/receipt processing.
  • Updated IOURequestStepScan web and native screens to consume the hook and remove duplicated logic.
  • Kept platform-specific camera capture flows in the respective screen files while delegating shared upload/flow behavior to the hook.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/pages/iou/request/step/IOURequestStepScan/useReceiptScan.ts New shared hook encapsulating scan/upload state + navigation + multi-scan logic.
src/pages/iou/request/step/IOURequestStepScan/index.tsx Web scan step updated to use useReceiptScan for shared business logic.
src/pages/iou/request/step/IOURequestStepScan/index.native.tsx Native scan step updated to use useReceiptScan for shared business logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samranahm samranahm changed the title IOURequestStepScan clean-up, phase 2: Extract shared business logic into useReceiptScan Hook IOURequestStepScan clean-up, phase 2: Extract shared business logic into useReceiptScan hook Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
...u/request/step/IOURequestStepScan/index.native.tsx 38.29% <85.71%> (-6.79%) ⬇️
.../request/step/IOURequestStepScan/useReceiptScan.ts 90.47% <90.47%> (ø)
...ages/iou/request/step/IOURequestStepScan/index.tsx 0.00% <0.00%> (ø)
... and 8 files with indirect coverage changes

@trjExpensify
Copy link
Contributor

PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself.

@trjExpensify trjExpensify removed their request for review February 12, 2026 23:57
@samranahm
Copy link
Contributor Author

Resolving merge conflicts.

@samranahm
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14f5883d50

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@samranahm
Copy link
Contributor Author

Ready for review 👍

getSource,
}: UseReceiptScanParams) {
const {isBetaEnabled} = usePermissions();
const {shouldStartLocationPermissionFlow} = useIOUUtils();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useIOUUtils hook was added in #66740 to make it reusable between index.ts and index.native files. Since we now consolidate the logic in useReceiptScan, I think we can just move the logic here and remove useIOUUtils

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This blinkStyle and showBlink can be moved to the hook too. The only difference is we call HaptiFeedback.press on the native file, but we already no-op it on the web.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be moved to the hook too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Native file pass file.uri to the source param of navigateToConfirmationStep, but the source param from setTestReceipt already contains the correct source. So, let's copy the index.ts logic.

@bernhardoj
Copy link
Contributor

bernhardoj commented Feb 19, 2026

@samranahm I keep having infinite loading when submitting the scan expense (happens on main too). Do you experience it too? If yes, I think we should report this.

image

@bernhardoj
Copy link
Contributor

On iOS, the image selector is unresponsive.

ios.e.mp4

@samranahm
Copy link
Contributor Author

@bernhardoj I’m not able to reproduce this on either dev or staging.

Kapture.2026-02-19.at.22.30.10.mp4

@samranahm
Copy link
Contributor Author

I keep having infinite loading when submitting the scan expense (happens on main too). Do you experience it too? If yes, I think we should report this.

@bernhardoj Please let me know if you still encountering this we should post this in slack to get more eyes.

@samranahm
Copy link
Contributor Author

On iOS, the image selector is unresponsive.

IOS.mp4

It’s working as expected on my end. Try building the app on latest that will potentially resolve it.

@bernhardoj
Copy link
Contributor

The infinite loading in my Android mWeb is caused by getCurrentPositionAsync never resolved. I've reported this in Slack.

const currentPosition = await getCurrentPositionAsync(options);

I've removed the get position logic to be able to test this.

@bernhardoj
Copy link
Contributor

@samranahm may I know the iOS simulator that you use?

@samranahm
Copy link
Contributor Author

@bernhardoj It's iPhone 16 with iOS 26.2

@bernhardoj
Copy link
Contributor

It keep failing when I tried to run with iOS 26

Failed to build the project
│
■  Cause: xcodebuild: error: Unable to find a destination matching the provided destination specifier:
│               { id:08742D2A-5811-4A45-9371-F0F6719F4EC8 }
│  Full log available at: /var/folders/kf/yhh_s0td6j9_1yysq42jn8fm0000gn/T/.rock-xcodebuild/1771602207106.log

@bernhardoj
Copy link
Contributor

I can use the lower version.

@melvin-bot melvin-bot bot requested a review from roryabraham February 20, 2026 16:04
const [shouldShowMultiScanEducationalPopup, setShouldShowMultiScanEducationalPopup] = useState(false);

// Clear receipt files when multi-scan is disabled
useEffect(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a misuse of useEffect - it fits somewhere between Updating state based on props or state and Resetting all state when a prop changes.

I believe that this is essentially a symptom that shows that isMultiScanEnabled should belong to this hook, rather than the parent.

  • Move isMultiScanEnabled state into useReceiptScan hook (was in parent)
  • Remove the useEffect that reactively clears receiptFiles on prop change
  • Clear receiptFiles directly in toggleMultiScan when disabling
  • Add key={transactionRequestType} on <IOURequestStepScan> to reset all state on tab switch
  • Remove isMultiScanEnabled/setIsMultiScanEnabled props from component and type interfaces
diff
diff --git a/src/pages/iou/request/IOURequestStartPage.tsx b/src/pages/iou/request/IOURequestStartPage.tsx
index 677d618a822..f02d50628bd 100644
--- a/src/pages/iou/request/IOURequestStartPage.tsx
+++ b/src/pages/iou/request/IOURequestStartPage.tsx
@@ -86,7 +86,6 @@ function IOURequestStartPage({
     const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false});
     const [lastSelectedDistanceRates] = useOnyx(ONYXKEYS.NVP_LAST_SELECTED_DISTANCE_RATES, {canBeMissing: true});
     const [draftTransactions] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION_DRAFT, {canBeMissing: true});
-    const [isMultiScanEnabled, setIsMultiScanEnabled] = useState(false);
     const [currentDate] = useOnyx(ONYXKEYS.CURRENT_DATE, {canBeMissing: true});
     const {isOffline} = useNetwork();
     const [nvpDismissedProductTraining] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING, {canBeMissing: true});
@@ -177,7 +176,6 @@ function IOURequestStartPage({
             if (transaction?.iouRequestType === newIOUType) {
                 return;
             }
-            setIsMultiScanEnabled(false);
             initMoneyRequest({
                 reportID,
                 policy,
@@ -334,13 +332,12 @@ function IOURequestStartPage({
                                     {() => (
                                         <TabScreenWithFocusTrapWrapper>
                                             <IOURequestStepScan
+                                                key={transactionRequestType}
                                                 route={route}
                                                 navigation={navigation}
                                                 onLayout={(setTestReceiptAndNavigate) => {
                                                     setTestReceiptAndNavigateRef.current = setTestReceiptAndNavigate;
                                                 }}
-                                                isMultiScanEnabled={isMultiScanEnabled}
-                                                setIsMultiScanEnabled={setIsMultiScanEnabled}
                                                 isStartingScan
                                             />
                                         </TabScreenWithFocusTrapWrapper>
diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx b/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx
index 2e94666bb0f..9d7d4a615da 100644
--- a/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx
+++ b/src/pages/iou/request/step/IOURequestStepScan/index.native.tsx
@@ -61,9 +61,7 @@ function IOURequestStepScan({
     transaction: initialTransaction,
     currentUserPersonalDetails,
     onLayout,
-    isMultiScanEnabled = false,
     isStartingScan = false,
-    setIsMultiScanEnabled,
 }: IOURequestStepScanProps) {
     const theme = useTheme();
     const styles = useThemeStyles();
@@ -198,6 +196,7 @@ function IOURequestStepScan({
     // Shared business logic from useReceiptScan hook
     const {
         isEditing,
+        isMultiScanEnabled,
         canUseMultiScan,
         shouldAcceptMultipleFiles,
         startLocationPermissionFlow,
@@ -226,11 +225,9 @@ function IOURequestStepScan({
         currentUserPersonalDetails,
         backTo,
         backToReport,
-        isMultiScanEnabled,
         isStartingScan,
         updateScanAndNavigate,
         getSource,
-        setIsMultiScanEnabled,
     });
 
     const viewfinderLayout = useRef<LayoutRectangle>(null);
diff --git a/src/pages/iou/request/step/IOURequestStepScan/index.tsx b/src/pages/iou/request/step/IOURequestStepScan/index.tsx
index e7cdac3388c..a22744ae01a 100644
--- a/src/pages/iou/request/step/IOURequestStepScan/index.tsx
+++ b/src/pages/iou/request/step/IOURequestStepScan/index.tsx
@@ -56,9 +56,7 @@ function IOURequestStepScan({
     transaction: initialTransaction,
     currentUserPersonalDetails,
     onLayout,
-    isMultiScanEnabled = false,
     isStartingScan = false,
-    setIsMultiScanEnabled,
 }: Omit<IOURequestStepScanProps, 'user'>) {
     const theme = useTheme();
     const styles = useThemeStyles();
@@ -96,6 +94,7 @@ function IOURequestStepScan({
     const {
         transactions,
         isEditing,
+        isMultiScanEnabled,
         canUseMultiScan,
         isReplacingReceipt,
         shouldAcceptMultipleFiles,
@@ -125,11 +124,9 @@ function IOURequestStepScan({
         currentUserPersonalDetails,
         backTo,
         backToReport,
-        isMultiScanEnabled,
         isStartingScan,
         updateScanAndNavigate,
         getSource,
-        setIsMultiScanEnabled,
     });
 
     const [videoConstraints, setVideoConstraints] = useState<MediaTrackConstraints>();
@@ -218,7 +215,6 @@ function IOURequestStepScan({
             if (isAllScanFilesCanBeRead) {
                 return;
             }
-            setIsMultiScanEnabled?.(false);
             removeTransactionReceipt(CONST.IOU.OPTIMISTIC_TRANSACTION_ID);
             removeDraftTransactions(true);
         });
diff --git a/src/pages/iou/request/step/IOURequestStepScan/types.ts b/src/pages/iou/request/step/IOURequestStepScan/types.ts
index 60ca9e955a1..09e1a448561 100644
--- a/src/pages/iou/request/step/IOURequestStepScan/types.ts
+++ b/src/pages/iou/request/step/IOURequestStepScan/types.ts
@@ -38,9 +38,6 @@ type UseReceiptScanParams = {
     /** Report ID to navigate back to */
     backToReport: string | undefined;
 
-    /** Whether multi-scan is enabled */
-    isMultiScanEnabled: boolean | undefined;
-
     /** Whether the user is starting a scan request */
     isStartingScan: boolean | undefined;
 
@@ -49,9 +46,6 @@ type UseReceiptScanParams = {
 
     /** Returns a source URL for the file based on platform */
     getSource: (file: FileObject) => string;
-
-    /** Callback to update multi-scan enabled state in parent */
-    setIsMultiScanEnabled: ((value: boolean) => void) | undefined;
 };
 
 type IOURequestStepScanProps = WithCurrentUserPersonalDetailsProps &
@@ -65,12 +59,6 @@ type IOURequestStepScanProps = WithCurrentUserPersonalDetailsProps &
          */
         onLayout?: (setTestReceiptAndNavigate: () => void) => void;
 
-        /** If the receipts preview should be shown */
-        isMultiScanEnabled?: boolean;
-
-        /** Updates isMultiScanEnabled flag */
-        setIsMultiScanEnabled?: (value: boolean) => void;
-
         /** Indicates whether users start to create scan request */
         isStartingScan?: boolean;
     };
diff --git a/src/pages/iou/request/step/IOURequestStepScan/useReceiptScan.ts b/src/pages/iou/request/step/IOURequestStepScan/useReceiptScan.ts
index 748f328e263..01fa4d0d800 100644
--- a/src/pages/iou/request/step/IOURequestStepScan/useReceiptScan.ts
+++ b/src/pages/iou/request/step/IOURequestStepScan/useReceiptScan.ts
@@ -1,6 +1,6 @@
 import TestReceipt from '@assets/images/fake-receipt.png';
 import {hasSeenTourSelector} from '@selectors/Onboarding';
-import {useEffect, useState} from 'react';
+import {useState} from 'react';
 import {InteractionManager} from 'react-native';
 import {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated';
 import useDefaultExpensePolicy from '@hooks/useDefaultExpensePolicy';
@@ -51,11 +51,9 @@ function useReceiptScan({
     currentUserPersonalDetails,
     backTo,
     backToReport,
-    isMultiScanEnabled = false,
     isStartingScan = false,
     updateScanAndNavigate,
     getSource,
-    setIsMultiScanEnabled,
 }: UseReceiptScanParams) {
     const {isBetaEnabled} = usePermissions();
     const [shouldStartLocationPermissionFlow] = useOnyx(ONYXKEYS.NVP_LAST_LOCATION_PERMISSION_PROMPT, {
@@ -99,18 +97,11 @@ function useReceiptScan({
     const shouldSkipConfirmation =
         !!skipConfirmation && !!report?.reportID && !isArchived && !(isPolicyExpenseChat(report) && ((policy?.requiresCategory ?? false) || (policy?.requiresTag ?? false)));
 
+    const [isMultiScanEnabled, setIsMultiScanEnabled] = useState(false);
     const [startLocationPermissionFlow, setStartLocationPermissionFlow] = useState(false);
     const [receiptFiles, setReceiptFiles] = useState<ReceiptFile[]>([]);
     const [shouldShowMultiScanEducationalPopup, setShouldShowMultiScanEducationalPopup] = useState(false);
 
-    // Clear receipt files when multi-scan is disabled
-    useEffect(() => {
-        if (isMultiScanEnabled) {
-            return;
-        }
-        setReceiptFiles([]);
-    }, [isMultiScanEnabled]);
-
     const blinkOpacity = useSharedValue(0);
     const blinkStyle = useAnimatedStyle(() => ({
         opacity: blinkOpacity.get(),
@@ -259,7 +250,11 @@ function useReceiptScan({
         }
         removeTransactionReceipt(CONST.IOU.OPTIMISTIC_TRANSACTION_ID);
         removeDraftTransactions(true);
-        setIsMultiScanEnabled?.(!isMultiScanEnabled);
+        const newValue = !isMultiScanEnabled;
+        setIsMultiScanEnabled(newValue);
+        if (!newValue) {
+            setReceiptFiles([]);
+        }
     }
 
     function dismissMultiScanEducationalPopup() {
@@ -273,6 +268,7 @@ function useReceiptScan({
     return {
         transactions,
         isEditing,
+        isMultiScanEnabled,
         canUseMultiScan,
         isReplacingReceipt,
         shouldAcceptMultipleFiles,
diff --git a/tests/ui/IOURequestStepScanTest.tsx b/tests/ui/IOURequestStepScanTest.tsx
index 67ff02410a0..127676c8604 100644
--- a/tests/ui/IOURequestStepScanTest.tsx
+++ b/tests/ui/IOURequestStepScanTest.tsx
@@ -201,9 +201,7 @@ describe('IOURequestStepScan', () => {
                                 } as unknown as PlatformStackScreenProps<MoneyRequestNavigatorParamList, typeof SCREENS.MONEY_REQUEST.STEP_SCAN>['route']
                             }
                             navigation={{} as never}
-                            isMultiScanEnabled
                             isStartingScan
-                            setIsMultiScanEnabled={jest.fn()}
                         />
                     </NavigationContainer>
                 </LocaleContextProvider>
diff --git a/tests/unit/hooks/useReceiptScan.test.ts b/tests/unit/hooks/useReceiptScan.test.ts
index 4722efe28eb..6e564052c09 100644
--- a/tests/unit/hooks/useReceiptScan.test.ts
+++ b/tests/unit/hooks/useReceiptScan.test.ts
@@ -76,9 +76,7 @@ function createDefaultParams(): Parameters<typeof useReceiptScan>[0] {
         getSource: (file: {uri?: string}) => file?.uri ?? 'file://image.png',
         backTo: undefined,
         backToReport: undefined,
-        isMultiScanEnabled: false,
         isStartingScan: true,
-        setIsMultiScanEnabled: undefined,
     };
 }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this belongs to Phase 6, but I'm fine to do it here since it's not a big change.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should follow the pattern of OP and do this in phase 6.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, sounds good we can do it in Phase 6

@samranahm
Copy link
Contributor Author

Resolving merge conflicts.

@samranahm
Copy link
Contributor Author

There's no prettier diff after running npm run prettier.

@roryabraham
Copy link
Contributor

There's no prettier diff after running npm run prettier.

Merge main, run npm install, and try again. We merged a patch to a prettier plugin yesterday

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving (anticipating further cleanup in upcoming phases of the linked issue)

@roryabraham roryabraham merged commit 1ac89a3 into Expensify:main Feb 21, 2026
27 checks passed
@github-actions
Copy link
Contributor

🚧 @roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.3.25-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 cancelled 🔪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants