Skip to content

[BT-005] Migrate First verify-account Route (Proof of Concept) #80910

@mjasikowski

Description

@mjasikowski

Description

Current State:

  • 17+ static verify-account routes exist in ROUTES.ts
  • Each route uses backTo parameter 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 with createDynamicRoute()
  • 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

  1. Find all navigation calls:

    grep -r "ROUTES.SETTINGS_WALLET_VERIFY_ACCOUNT" src/
  2. Replace navigation calls:

    // OLD
    Navigation.navigate(ROUTES.SETTINGS_WALLET_VERIFY_ACCOUNT.getRoute(backTo));
    
    // NEW
    Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.VERIFY_ACCOUNT.path));
  3. Add entry screens to config

  4. Bind component to navigator

  5. 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 - Populate entryScreens array
  • Files that call Navigation.navigate(ROUTES.SETTINGS_WALLET_VERIFY_ACCOUNT...)
  • App/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx

Dependencies:

Metadata

Metadata

Labels

InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions