-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
InternalRequires API changes or must be handled by Expensify staffRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2
Description
Description
Current State:
- 17+ static verify-account routes exist in
ROUTES.ts - Each route uses
backToparameter for return navigation - Example:
SETTINGS_WALLET_VERIFY_ACCOUNT
Expected State:
- Pick ONE route to migrate as proof-of-concept
- Replace all
Navigation.navigate()calls to that route withcreateDynamicRoute() - Add the source screens to
DYNAMIC_ROUTES.VERIFY_ACCOUNT.entryScreens - Verify the entire flow works:
- Navigation to dynamic route
- Back navigation strips suffix
- Page refresh restores state correctly
- Deep link works
Recommended First Migration: SETTINGS_WALLET_VERIFY_ACCOUNT
Reasoning:
- Clear entry point (Wallet settings)
- Single flow (no complex forward logic)
- Good test of core functionality
Migration Steps
-
Find all navigation calls:
grep -r "ROUTES.SETTINGS_WALLET_VERIFY_ACCOUNT" src/ -
Replace navigation calls:
// OLD Navigation.navigate(ROUTES.SETTINGS_WALLET_VERIFY_ACCOUNT.getRoute(backTo)); // NEW Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.VERIFY_ACCOUNT.path));
-
Add entry screens to config
-
Bind component to navigator
-
Test the flow:
- Navigate to Settings > Wallet
- Trigger action that requires verification
- Verify URL shows
settings/wallet/verify-account - Complete or cancel verification
- Verify return to Settings > Wallet
- Refresh page, verify state restores
- Test deep link
Scope
Files:
App/src/ROUTES.ts- PopulateentryScreensarray- Files that call
Navigation.navigate(ROUTES.SETTINGS_WALLET_VERIFY_ACCOUNT...) App/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx
Dependencies:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
InternalRequires API changes or must be handled by Expensify staffRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2