Skip to content

Commit 3b8f9b2

Browse files
authored
chore(card): type Card navigators with feature param lists (Phase 3) (#33283)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until this PR meets the canonical Definition of Ready For Review in `docs/readme/ready-for-review.md`. In short: the template must be materially complete (not just section titles present), all status checks must be currently passing, and the only expected follow-up commits must be reviewer-driven. --> <!-- mms-check directive vocabulary — read by .github/scripts/shared/pr-template-checks.ts at module load to build the validation plan. Directives are invisible in rendered markdown and must NOT be removed or edited without updating the validator registry. type=text Section must contain non-placeholder prose. type=changelog Section must have a valid CHANGELOG entry: line. type=issue-link Section must have a Fixes:/Closes:/Refs: line with a value. type=manual-testing Section must have real testing steps or an explicit N/A. type=screenshot Section must have evidence (image/URL) or an explicit N/A. type=checklist Section must have all checkboxes consciously checked. required=true|false Whether a missing/invalid section runs the validator at all. blocking=true|false Whether a failure of this check fails the CI workflow. Default: false — failures are shown as warnings in the sticky comment but do not block the PR. Sections without a directive are checked for structural presence only. --> ## **Description** <!-- mms-check: type=text required=true --> **Phase 3 of the incremental React Navigation typing migration — Card feature.** Card’s nested navigators (`CardScreens` / `CardModals`) were still loosely typed (`undefined` / `NestedNavigationParams`), so nested `navigate(container, { screen, params })` calls for Card could not be checked against real screen param shapes. This PR introduces feature-level param lists and wires them into the Card navigators and `RootStackParamList`, following the same pattern used for Perps / Rewards / Predict. This is **types-only** — no intentional runtime navigation behavior change. ### What changed **Feature param lists (`app/components/UI/Card/types/navigation.ts`)** - `CardScreensStackParamList` — main stack screens (`MainRoutes`): Home, Welcome, ChooseYourCard, ReviewOrder, OrderCompleted, Cashback, CreditRedeem, Authentication, SpendingLimit, Onboarding - `CardModalsNavigationParamList` — modal stack screens (`CardModalsRoutes`) - `CardRootParamList` — outer `CardRoutes` stack (`CardHome` → nested main stack, `CardModals` → modal stack) - `CardNavigationParamList` — feature union + nested `CardScreens` / `CardModals` entries **Navigators (`app/components/UI/Card/routes/index.tsx`)** - Split the previously shared untyped `Stack` into typed `ScreensStack` (`CardScreensStackParamList`) and `RootStack` (`CardRootParamList`) - Kept `ModalsStack` typed with `CardModalsNavigationParamList` **Root stack (`app/core/NavigationService/types.ts`)** - `CardScreens` → `NavigatorScreenParams<CardRootParamList>` - `CardModals` → `NavigatorScreenParams<CardModalsNavigationParamList>` - Leaf Card screen/modal routes now reference the feature param lists instead of ad-hoc / `undefined` shapes **Call-site cleanup** - Exported modal param types from AddFunds / AssetSelection / RegionSelector / ConfirmModal / Password bottom sheets so the modal param list stays in sync with what each screen reads ## **Changelog** <!-- mms-check: type=changelog required=true blocking=true --> <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry:null ## **Related issues** <!-- mms-check: type=issue-link required=true --> Fixes:https://consensyssoftware.atlassian.net/browse/MCWP-674 ## **Manual testing steps** <!-- mms-check: type=manual-testing required=true --> n/a type changes only ## **Screenshots/Recordings** <!-- mms-check: type=screenshot required=true --> <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> n/a type changes only ## **Pre-merge author checklist** <!-- mms-check: type=checklist required=true --> <!-- Every checklist item must be consciously assessed before marking this PR as "Ready for review". A checked box means you deliberately considered that responsibility, not that you literally performed every action listed. Unchecked boxes are ambiguous: they are not an implicit "N/A" and they are not a silent "skip". See `docs/readme/ready-for-review.md` for the full checklist semantics. --> - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### Performance checks (if applicable) - [ ] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [ ] I've tested with a power user scenario - Use these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **Pre-merge reviewer checklist** <!-- Reviewer checklist items follow the same semantics as the author checklist: an unchecked box is ambiguous, a checked box means the reviewer consciously assessed that responsibility. See `docs/readme/ready-for-review.md`. --> - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Compile-time-only navigation typing and export visibility changes; no deliberate behavior changes, though stricter param types may surface existing navigate() mismatches at build time. > > **Overview** > **Phase 3** adds strict React Navigation typing for Card, matching the Perps / Rewards / Predict pattern. There is **no intended runtime navigation change**. > > A new `app/components/UI/Card/types/navigation.ts` defines **`CardScreensStackParamList`**, **`CardModalsNavigationParamList`**, **`CardRootParamList`**, and **`CardNavigationParamList`**, with screen params pulled from existing view/modal types (and newly **exported** modal param interfaces on Add Funds, Asset Selection, Region Selector, Confirm, and Password sheets). > > In **`Card/routes/index.tsx`**, the shared untyped stack is split into typed **`ScreensStack`**, **`RootStack`**, and **`ModalsStack`**; **`spendingLimitScreenOptions`** now keys off **`CardScreensStackParamList['CardSpendingLimit']`** (including broader `flow` values such as `enable_card`). > > **`RootStackParamList`** in **`NavigationService/types.ts`** now types **`CardScreens`** / **`CardModals`** with **`NavigatorScreenParams<…>`** and points leaf Card routes at the feature lists instead of **`undefined`**, loose **`NestedNavigationParams`**, or duplicated ad-hoc shapes (e.g. **`CardConfirmModal`**, **`ChooseYourCard`**, **`OrderCompleted`**). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 79be098. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent e159f48 commit 3b8f9b2

8 files changed

Lines changed: 173 additions & 68 deletions

File tree

app/components/UI/Card/components/AddFundsBottomSheet/AddFundsBottomSheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
import Routes from '../../../../../constants/navigation/Routes';
4343
import { mapCaipChainIdToChainName } from '../../util/mapCaipChainIdToChainName';
4444

45-
interface AddFundsModalNavigationDetails {
45+
export interface AddFundsModalNavigationDetails {
4646
priorityToken?: CardFundingToken;
4747
}
4848

app/components/UI/Card/components/AssetSelectionBottomSheet/AssetSelectionBottomSheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import {
4848
import { useCardHomeData } from '../../hooks/useCardHomeData';
4949
import MoneyBalanceIcon from '../../../../../images/money-balance.svg';
5050

51-
interface AssetSelectionModalNavigationDetails {
51+
export interface AssetSelectionModalNavigationDetails {
5252
navigateToCardHomeOnPriorityToken?: boolean;
5353
selectionOnly?: boolean;
5454
onTokenSelect?: (token: CardFundingToken) => void;

app/components/UI/Card/components/Onboarding/ConfirmModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { ModalAction } from '../../../Rewards/components/RewardsBottomSheetModal
2222
import { strings } from '../../../../../../locales/i18n';
2323
import { useParams } from '../../../../../util/navigation/navUtils';
2424

25-
interface ConfirmModalParams {
25+
export interface ConfirmModalParams {
2626
title: string;
2727
description: string;
2828
icon: IconName;

app/components/UI/Card/components/Onboarding/RegionSelectorModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const clearOnValueChange = () => {
4747
onValueChangeCallback = null;
4848
};
4949

50-
interface RegionSelectorModalParams {
50+
export interface RegionSelectorModalParams {
5151
regions: Region[];
5252
renderAreaCode?: boolean;
5353
selectedRegionKey?: string | null;

app/components/UI/Card/components/PasswordBottomSheet/PasswordBottomSheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import useAuthentication from '../../../../../core/Authentication/hooks/useAuthe
2626
import { useTailwind } from '@metamask/design-system-twrnc-preset';
2727
import { CardHomeSelectors } from '../../Views/CardHome/CardHome.testIds';
2828

29-
interface PasswordBottomSheetParams {
29+
export interface PasswordBottomSheetParams {
3030
onSuccess: () => void;
3131
description?: string;
3232
}

app/components/UI/Card/routes/index.tsx

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,15 @@ import {
3838
clearNativeStackNavigatorOptions,
3939
transparentModalScreenOptions,
4040
} from '../../../../constants/navigation/clearStackNavigatorOptions';
41+
import type {
42+
CardModalsNavigationParamList,
43+
CardRootParamList,
44+
CardScreensStackParamList,
45+
} from '../types/navigation';
4146

42-
const Stack = createNativeStackNavigator();
43-
const ModalsStack = createNativeStackNavigator();
47+
const ScreensStack = createNativeStackNavigator<CardScreensStackParamList>();
48+
const RootStack = createNativeStackNavigator<CardRootParamList>();
49+
const ModalsStack = createNativeStackNavigator<CardModalsNavigationParamList>();
4450

4551
// All Card main screens render their own header via HeaderStandard, so hide
4652
// the navigator chrome by default.
@@ -51,7 +57,9 @@ const mainScreenOptions: NativeStackNavigationOptions = { headerShown: false };
5157
const spendingLimitScreenOptions = ({
5258
route,
5359
}: {
54-
route: { params?: { flow?: 'manage' | 'enable' | 'onboarding' } };
60+
route: {
61+
params?: CardScreensStackParamList['CardSpendingLimit'];
62+
};
5563
}): NativeStackNavigationOptions => ({
5664
headerShown: false,
5765
gestureEnabled: route.params?.flow !== 'onboarding',
@@ -68,37 +76,43 @@ const MainRoutes = () => {
6876
);
6977

7078
return (
71-
<Stack.Navigator
79+
<ScreensStack.Navigator
7280
initialRouteName={initialRouteName}
7381
screenOptions={mainScreenOptions}
7482
>
75-
<Stack.Screen name={Routes.CARD.HOME} component={CardHome} />
76-
<Stack.Screen name={Routes.CARD.WELCOME} component={CardWelcome} />
77-
<Stack.Screen
83+
<ScreensStack.Screen name={Routes.CARD.HOME} component={CardHome} />
84+
<ScreensStack.Screen name={Routes.CARD.WELCOME} component={CardWelcome} />
85+
<ScreensStack.Screen
7886
name={Routes.CARD.CHOOSE_YOUR_CARD}
7987
component={ChooseYourCard}
8088
/>
81-
<Stack.Screen name={Routes.CARD.REVIEW_ORDER} component={ReviewOrder} />
82-
<Stack.Screen
89+
<ScreensStack.Screen
90+
name={Routes.CARD.REVIEW_ORDER}
91+
component={ReviewOrder}
92+
/>
93+
<ScreensStack.Screen
8394
name={Routes.CARD.ORDER_COMPLETED}
8495
component={OrderCompleted}
8596
/>
86-
<Stack.Screen name={Routes.CARD.CASHBACK} component={Cashback} />
87-
<Stack.Screen name={Routes.CARD.CREDIT_REDEEM} component={CreditRedeem} />
88-
<Stack.Screen
97+
<ScreensStack.Screen name={Routes.CARD.CASHBACK} component={Cashback} />
98+
<ScreensStack.Screen
99+
name={Routes.CARD.CREDIT_REDEEM}
100+
component={CreditRedeem}
101+
/>
102+
<ScreensStack.Screen
89103
name={Routes.CARD.AUTHENTICATION}
90104
component={CardAuthentication}
91105
/>
92-
<Stack.Screen
106+
<ScreensStack.Screen
93107
name={Routes.CARD.SPENDING_LIMIT}
94108
component={SpendingLimit}
95109
options={spendingLimitScreenOptions}
96110
/>
97-
<Stack.Screen
111+
<ScreensStack.Screen
98112
name={Routes.CARD.ONBOARDING.ROOT}
99113
component={OnboardingNavigator}
100114
/>
101-
</Stack.Navigator>
115+
</ScreensStack.Navigator>
102116
);
103117
};
104118

@@ -169,20 +183,20 @@ const CardModalsRoutes = () => (
169183
);
170184

171185
const CardRoutes = () => (
172-
<Stack.Navigator
186+
<RootStack.Navigator
173187
initialRouteName={Routes.CARD.HOME}
174188
screenOptions={{ headerShown: false }}
175189
>
176-
<Stack.Screen name={Routes.CARD.HOME} component={MainRoutes} />
177-
<Stack.Screen
190+
<RootStack.Screen name={Routes.CARD.HOME} component={MainRoutes} />
191+
<RootStack.Screen
178192
name={Routes.CARD.MODALS.ID}
179193
component={CardModalsRoutes}
180194
options={{
181195
...clearNativeStackNavigatorOptions,
182196
...transparentModalScreenOptions,
183197
}}
184198
/>
185-
</Stack.Navigator>
199+
</RootStack.Navigator>
186200
);
187201

188202
export default withCardSDK(CardRoutes);
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
import type { NavigatorScreenParams } from '@react-navigation/native';
2+
import type { AddFundsModalNavigationDetails } from '../components/AddFundsBottomSheet/AddFundsBottomSheet';
3+
import type { AssetSelectionModalNavigationDetails } from '../components/AssetSelectionBottomSheet/AssetSelectionBottomSheet';
4+
import type { RegionSelectorModalParams } from '../components/Onboarding/RegionSelectorModal';
5+
import type { ConfirmModalParams } from '../components/Onboarding/ConfirmModal';
6+
import type { PasswordBottomSheetParams } from '../components/PasswordBottomSheet/PasswordBottomSheet';
7+
import type { DaimoPayModalParams } from '../components/DaimoPayModal/DaimoPayModal';
8+
import type { CreditBalanceTooltipParams } from '../components/CreditBalanceTooltipSheet/CreditBalanceTooltipSheet';
9+
import type { MoneyUnlinkCardSheetRouteParams } from '../components/MoneyUnlinkCardSheet/MoneyUnlinkCardSheet';
10+
import type { ChooseYourCardParams } from '../Views/ChooseYourCard/ChooseYourCard';
11+
import type { ReviewOrderParams } from '../Views/ReviewOrder/ReviewOrder';
12+
import type { OrderCompletedParams } from '../Views/OrderCompleted/OrderCompleted';
13+
import type { CardFundingToken, CardUserPhase } from '../types';
14+
15+
/**
16+
* Nested-navigation params for Card container screens navigated via
17+
* `navigate(container, { screen, params })`.
18+
*
19+
* Kept local to avoid a circular import with NavigationService/types.
20+
*/
21+
interface CardNestedNavigationParams {
22+
screen?: string;
23+
params?: object;
24+
}
25+
26+
/**
27+
* Param list for screens inside the Card main stack (`MainRoutes`).
28+
*/
29+
// ParamListBase requires `type`; `interface` cannot satisfy it.
30+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
31+
export type CardScreensStackParamList = {
32+
CardHome: undefined;
33+
CardWelcome: undefined;
34+
ChooseYourCard: ChooseYourCardParams | undefined;
35+
ReviewOrder: ReviewOrderParams | undefined;
36+
OrderCompleted: OrderCompletedParams | undefined;
37+
CardCashback: undefined;
38+
CardCreditRedeem: undefined;
39+
CardAuthentication:
40+
| {
41+
showAuthPrompt?: boolean;
42+
postAuthRedirect?: { screen: string; params?: object };
43+
}
44+
| undefined;
45+
CardSpendingLimit:
46+
| {
47+
flow?: 'manage' | 'enable' | 'onboarding' | 'enable_card';
48+
selectedToken?: CardFundingToken;
49+
}
50+
| undefined;
51+
CardOnboarding:
52+
| (CardNestedNavigationParams & { cardUserPhase?: CardUserPhase })
53+
| undefined;
54+
};
55+
56+
/**
57+
* Param list for screens inside the Card modal stack (`CardModalsRoutes`).
58+
*/
59+
// ParamListBase requires `type`; `interface` cannot satisfy it.
60+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
61+
export type CardModalsNavigationParamList = {
62+
CardAddFundsModal: AddFundsModalNavigationDetails | undefined;
63+
CardAssetSelectionModal: AssetSelectionModalNavigationDetails | undefined;
64+
CardRegionSelectionModal: RegionSelectorModalParams;
65+
CardConfirmModal: ConfirmModalParams;
66+
CardPasswordModal: PasswordBottomSheetParams;
67+
CardRecurringFeeModal: undefined;
68+
CardDaimoPayModal: DaimoPayModalParams;
69+
CardViewPinModal: { imageUrl: string };
70+
CardSpendingLimitOptionsModal: {
71+
currentLimitType: 'full' | 'restricted';
72+
currentCustomLimit: string;
73+
callerRoute: string;
74+
callerParams?: Record<string, unknown>;
75+
};
76+
CardWaitlistFormModal: { url: string };
77+
CardForgotPasswordModal: { location?: 'us' | 'international' } | undefined;
78+
CardCreditBalanceTooltipModal: CreditBalanceTooltipParams | undefined;
79+
CardCreditRefundTooltipModal: { isMoneyAccount?: boolean } | undefined;
80+
CardUnlinkMoneyAccountSheet: MoneyUnlinkCardSheetRouteParams | undefined;
81+
};
82+
83+
/**
84+
* Param list for the outer Card root stack (`CardRoutes`): main screens + modals.
85+
*/
86+
// ParamListBase requires `type`; `interface` cannot satisfy it.
87+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
88+
export type CardRootParamList = {
89+
CardHome: NavigatorScreenParams<CardScreensStackParamList> | undefined;
90+
CardModals: NavigatorScreenParams<CardModalsNavigationParamList> | undefined;
91+
};
92+
93+
/**
94+
* Feature-level Card navigation params for nested `CardScreens` / `CardModals` entry.
95+
*/
96+
// Intersection (`&`) requires `type`; `interface` cannot express this.
97+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
98+
export type CardNavigationParamList = CardScreensStackParamList &
99+
CardModalsNavigationParamList & {
100+
CardScreens: NavigatorScreenParams<CardRootParamList> | undefined;
101+
CardModals:
102+
| NavigatorScreenParams<CardModalsNavigationParamList>
103+
| undefined;
104+
};

app/core/NavigationService/types.ts

Lines changed: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,18 @@ import type {
7474
PerpsStackParamList,
7575
} from '../../components/UI/Perps/types/navigation';
7676
import type { MoneyNavigationParamList } from '../../components/UI/Money/types/navigation';
77+
import type {
78+
CardModalsNavigationParamList,
79+
CardRootParamList,
80+
CardScreensStackParamList,
81+
} from '../../components/UI/Card/types/navigation';
7782
import type { TrendingTokensFullViewParams } from '../../components/UI/Trending/Views/TrendingTokensFullView/TrendingTokensFullView';
7883
import type { MarketInsightsRouteParams } from '../../components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView';
7984
import type { MoreTokenActionsMenuParams } from '../../components/UI/TokenDetails/components/MoreTokenActionsMenu';
8085
import type { SecurityBadgeBottomSheetParams } from '../../components/UI/TokenDetails/components/SecurityBadgeBottomSheet';
8186
import type { MAPickerSheetParams } from '../../components/UI/Charts/AdvancedChart/MAPickerSheet';
8287
import type { AgenticCliApprovalParams } from '../../components/Views/AgenticCliApproval/types';
8388
import type { AgenticCliDashboardWebviewParams } from '../../components/Views/AgenticCliDashboardWebview/types';
84-
import type { CreditBalanceTooltipParams } from '../../components/UI/Card/components/CreditBalanceTooltipSheet/CreditBalanceTooltipSheet';
85-
import type { MoneyUnlinkCardSheetRouteParams } from '../../components/UI/Card/components/MoneyUnlinkCardSheet/MoneyUnlinkCardSheet';
8689
import type { MoneyDeeplinkModalParams } from '../../components/UI/Money/components/MoneyDeeplinkModal/MoneyDeeplinkModal';
8790
import type { TradingSignalsSetupParams } from '../../components/Views/SocialLeaderboard/components/TradingSignalsSetupBottomSheet/TradingSignalsSetupBottomSheet';
8891
import type { ExploreFeedRouteParams } from '../../components/Views/TrendingView/TrendingView';
@@ -193,9 +196,6 @@ import type {
193196
} from '../../components/Views/RevealPrivateCredential/RevealPrivateCredential.types';
194197

195198
// Card params
196-
import type { CardConfirmModalParams } from '../../components/UI/Card/Card.types';
197-
import type { ShippingAddress } from '../../components/UI/Card/util/buildUserAddress';
198-
199199
// Account actions params
200200
import type {
201201
AccountActionsParams,
@@ -927,25 +927,17 @@ export type RootStackParamList = {
927927
///: END:ONLY_INCLUDE_IF
928928

929929
// Card routes
930-
CardScreens: undefined;
931-
CardHome: undefined;
932-
CardWelcome: undefined;
933-
CardAuthentication: { showAuthPrompt?: boolean } | undefined;
934-
CardSpendingLimit: { flow: string } | undefined;
935-
ChooseYourCard:
936-
| { flow: string; shippingAddress?: ShippingAddress }
937-
| undefined;
938-
CardCashback: undefined;
939-
CardCreditRedeem: undefined;
940-
ReviewOrder: undefined;
941-
OrderCompleted:
942-
| {
943-
paymentMethod?: string;
944-
transactionHash?: string;
945-
fromUpgrade?: boolean;
946-
}
947-
| undefined;
948-
CardOnboarding: undefined;
930+
CardScreens: NavigatorScreenParams<CardRootParamList> | undefined;
931+
CardHome: CardScreensStackParamList['CardHome'];
932+
CardWelcome: CardScreensStackParamList['CardWelcome'];
933+
CardAuthentication: CardScreensStackParamList['CardAuthentication'];
934+
CardSpendingLimit: CardScreensStackParamList['CardSpendingLimit'];
935+
ChooseYourCard: CardScreensStackParamList['ChooseYourCard'];
936+
CardCashback: CardScreensStackParamList['CardCashback'];
937+
CardCreditRedeem: CardScreensStackParamList['CardCreditRedeem'];
938+
ReviewOrder: CardScreensStackParamList['ReviewOrder'];
939+
OrderCompleted: CardScreensStackParamList['OrderCompleted'];
940+
CardOnboarding: CardScreensStackParamList['CardOnboarding'];
949941
CardOnboardingSignUp: undefined;
950942
CardOnboardingConfirmEmail: undefined;
951943
CardOnboardingSetPhoneNumber: undefined;
@@ -957,26 +949,21 @@ export type RootStackParamList = {
957949
CardOnboardingComplete: undefined;
958950
CardOnboardingKYCFailed: undefined;
959951
CardOnboardingKYCPending: undefined;
960-
CardModals: NestedNavigationParams | undefined;
961-
CardAddFundsModal: undefined;
962-
CardAssetSelectionModal: undefined;
963-
CardRegionSelectionModal: undefined;
964-
CardConfirmModal: CardConfirmModalParams | undefined;
965-
CardPasswordModal: undefined;
966-
CardRecurringFeeModal: undefined;
967-
CardDaimoPayModal: undefined;
968-
CardViewPinModal: { imageUrl: string };
969-
CardSpendingLimitOptionsModal: {
970-
currentLimitType: 'full' | 'restricted';
971-
currentCustomLimit: string;
972-
callerRoute: string;
973-
callerParams?: Record<string, unknown>;
974-
};
975-
CardWaitlistFormModal: { url: string };
976-
CardForgotPasswordModal: { location?: 'us' | 'international' } | undefined;
977-
CardCreditBalanceTooltipModal: CreditBalanceTooltipParams | undefined;
978-
CardCreditRefundTooltipModal: { isMoneyAccount?: boolean } | undefined;
979-
CardUnlinkMoneyAccountSheet: MoneyUnlinkCardSheetRouteParams | undefined;
952+
CardModals: NavigatorScreenParams<CardModalsNavigationParamList> | undefined;
953+
CardAddFundsModal: CardModalsNavigationParamList['CardAddFundsModal'];
954+
CardAssetSelectionModal: CardModalsNavigationParamList['CardAssetSelectionModal'];
955+
CardRegionSelectionModal: CardModalsNavigationParamList['CardRegionSelectionModal'];
956+
CardConfirmModal: CardModalsNavigationParamList['CardConfirmModal'];
957+
CardPasswordModal: CardModalsNavigationParamList['CardPasswordModal'];
958+
CardRecurringFeeModal: CardModalsNavigationParamList['CardRecurringFeeModal'];
959+
CardDaimoPayModal: CardModalsNavigationParamList['CardDaimoPayModal'];
960+
CardViewPinModal: CardModalsNavigationParamList['CardViewPinModal'];
961+
CardSpendingLimitOptionsModal: CardModalsNavigationParamList['CardSpendingLimitOptionsModal'];
962+
CardWaitlistFormModal: CardModalsNavigationParamList['CardWaitlistFormModal'];
963+
CardForgotPasswordModal: CardModalsNavigationParamList['CardForgotPasswordModal'];
964+
CardCreditBalanceTooltipModal: CardModalsNavigationParamList['CardCreditBalanceTooltipModal'];
965+
CardCreditRefundTooltipModal: CardModalsNavigationParamList['CardCreditRefundTooltipModal'];
966+
CardUnlinkMoneyAccountSheet: CardModalsNavigationParamList['CardUnlinkMoneyAccountSheet'];
980967

981968
// Send routes
982969
Recipient: SendRecipientParams | undefined;

0 commit comments

Comments
 (0)