Skip to content

Commit 0930dbb

Browse files
committed
fix: auto checks
1 parent 7f4d833 commit 0930dbb

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/pages/ReimbursementAccount/USD/ConnectBankAccount/ConnectBankAccount.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ function ConnectBankAccount({onBackButtonPress, setShouldShowConnectedVerifiedBa
142142
reimbursementAccount={reimbursementAccount}
143143
setUSDBankAccountStep={setUSDBankAccountStep}
144144
backTo={backTo}
145+
policy={policy}
145146
/>
146147
)}
147148
</ScreenWrapper>

src/pages/ReimbursementAccount/USD/ConnectBankAccount/components/FinishChatCard.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {hasSeenTourSelector} from '@selectors/Onboarding';
22
import React from 'react';
3+
import type {OnyxEntry} from 'react-native-onyx';
34
import MenuItem from '@components/MenuItem';
45
import ScrollView from '@components/ScrollView';
56
import Section from '@components/Section';
@@ -18,7 +19,7 @@ import CONST from '@src/CONST';
1819
import ONYXKEYS from '@src/ONYXKEYS';
1920
import ROUTES from '@src/ROUTES';
2021
import type {Route} from '@src/ROUTES';
21-
import type {ReimbursementAccount} from '@src/types/onyx';
22+
import type {Policy, ReimbursementAccount} from '@src/types/onyx';
2223
import Enable2FACard from './Enable2FACard';
2324

2425
type FinishChatCardProps = {
@@ -28,14 +29,17 @@ type FinishChatCardProps = {
2829
/** Boolean required to display Enable2FACard component */
2930
requiresTwoFactorAuth: boolean;
3031

32+
/** The policy which the user has access to and which the report is tied to */
33+
policy: OnyxEntry<Policy>;
34+
3135
/** Method to set the state of USD bank account step */
3236
setUSDBankAccountStep?: (step: string | null) => void;
3337

3438
/** Route to return to when navigating back out of the flow */
3539
backTo?: Route;
3640
};
3741

38-
function FinishChatCard({requiresTwoFactorAuth, reimbursementAccount, setUSDBankAccountStep, backTo}: FinishChatCardProps) {
42+
function FinishChatCard({requiresTwoFactorAuth, reimbursementAccount, policy, setUSDBankAccountStep, backTo}: FinishChatCardProps) {
3943
const {translate} = useLocalize();
4044
const styles = useThemeStyles();
4145
const {shouldUseNarrowLayout} = useResponsiveLayout();
@@ -86,7 +90,7 @@ function FinishChatCard({requiresTwoFactorAuth, reimbursementAccount, setUSDBank
8690
goToWithdrawalAccountSetupStep(CONST.BANK_ACCOUNT.STEP.REQUESTOR);
8791
Navigation.navigate(
8892
ROUTES.BANK_ACCOUNT_USD_SETUP.getRoute({
89-
policyID,
93+
policyID: policy?.id,
9094
page: CONST.BANK_ACCOUNT.PAGE_NAMES.REQUESTOR,
9195
subPage: CONST.BANK_ACCOUNT.PERSONAL_INFO_STEP.SUB_PAGE_NAMES.FULL_NAME,
9296
backTo,

0 commit comments

Comments
 (0)