Skip to content

[Due for payment 2026-10-16] [$250] Require address in deposit account setup flow #100075

Closed

Description

@coleaeason

Problem

We need address information for deposit accounts in order to complete our reporting obligations. Old Dot requires address information today but New Dot does not.

Solution

Update the Deposit Account setup flow to collect address information for the user if we do not already have it.

cc @nkuoch

Related internal issue: https://github.com/Expensify/Expensify/issues/625091

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit

Activity

  1. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 1, 2026
  2. melvin-bot commented on Sep 1, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  3. Dip-G-Git commented on Sep 1, 2026

    @Dip-G-Git
  4. github-actions commented on Sep 1, 2026

    @github-actions
    Contributor

    ⚠️ @Dip-G-Git Thanks for your interest. To be considered for this job, please post a proposal following the proposal template (note the mandatory sections). Comments claiming the job without one are not reviewed.

  5. samranahm commented on Sep 1, 2026

    @samranahm
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-10-01 06:44:58 UTC.

    Proposal

    What is the root cause of that problem?

    When someone turns on their wallet and adds a bank account, the app creates that bank account as soon as they press Confirm on the Plaid screen. It has not asked for their legal name or home address yet. If they leave during the personal info step that comes next, the bank account stays open with no name and no address.

    That bank step only has two pages, Plaid and Confirmation:

    const plaidPages = [
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.PLAID, component: Plaid},
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];

    Confirm sends only the bank they picked in Plaid:

    if (selectedPlaidBankAccount) {
    const bankAccountWithToken = selectedPlaidBankAccount.plaidAccessToken
    ? selectedPlaidBankAccount
    : {
    ...selectedPlaidBankAccount,
    plaidAccessToken: plaidData?.plaidAccessToken ?? '',
    };
    addPersonalBankAccount(bankAccountWithToken, personalPolicyID);

    The save call can already take a first name, a last name, and an address. From this screen those fields are all empty:

    legalFirstName: account?.legalFirstName,
    legalLastName: account?.legalLastName,
    addressStreet: getFormattedStreet(account?.addressStreet, account?.addressStreet2),
    addressCity: account?.addressCity,
    addressState: account?.addressState,
    addressZip: account?.addressZipCode,
    addressCountry: account?.country,

    The name and address questions come later, in the personal info step, and that step sends a different request. The bank account is already created by then. The thread also says we should ask for the legal first and last name before the bank account is created. Bank accounts that already exist without an address are handled somewhere else.

    What changes do you think we should make in order to solve the problem?

    Ask for the legal name and address in the wallet bank step, the same way the other add-bank flow already does. Only ask when we do not already have the answers. Then send those answers with the bank account, and do not ask for them again on the next step.

    1. In AddBankAccount, add a legal name page and an address page between Plaid and Confirmation. The name page can be the existing LegalNameStep. It already saves legalFirstName and legalLastName on the bank form this screen uses.

    const plaidPages = [
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.PLAID, component: Plaid},
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];

    const plaidPages = [
        {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.PLAID, component: Plaid},
        {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.LEGAL_NAME, component: LegalName},
        {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.ADDRESS, component: Address},
        {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];
    1. Use the wallet address form, not the address form from the other bank flow. That other form opens a country list, and Enable Payments has no country page, so the list never opens. With no country saved, State becomes a plain text box. The wallet form already has a state list, and the state page does exist here. Keep the country as US.

    App/src/ROUTES.ts

    Lines 964 to 976 in 4e2b30d

    ADDRESS_COUNTRY: {
    path: 'country',
    entryScreens: [
    SCREENS.SETTINGS.PROFILE.ADDRESS,
    SCREENS.SETTINGS.PROFILE.PRIVATE_PERSONAL_DETAILS,
    SCREENS.WORKSPACE.DYNAMIC_WORKSPACE_OVERVIEW_ADDRESS,
    SCREENS.SETTINGS.WALLET.CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS,
    SCREENS.DOMAIN_CARD.DOMAIN_CARD_UPDATE_ADDRESS,
    SCREENS.TRAVEL.ENABLE,
    SCREENS.SETTINGS.ADD_US_BANK_ACCOUNT,
    SCREENS.ADD_PERSONAL_BANK_ACCOUNT_ROOT,
    SCREENS.SETTINGS.UPDATE_PERSONAL_BANK_ACCOUNT,
    ],

    useEffect(() => {
    if (!address) {
    return;
    }
    setState(draftState ?? address?.state);
    setCurrentCountry(draftCountry ?? address?.country);
    setCity(address?.city);
    setZipcode(address?.zip);
    }, [address?.state, address?.country, address?.city, address?.zip, address, draftCountry, draftState]);

    const defaultValues = {
        street,
        city,
        state,
        zipCode,
        country: CONST.COUNTRY.US,
    };
    
    <CommonAddressStep
        defaultValues={defaultValues}
        shouldAllowCountryChange={false}
    />
    1. Skip a page when we already have the answer. Skip the name page when both names are saved. Skip the address page only when the saved address is a full US address (street, city, state, zip, and country US). A saved address from another country still needs the US form. Skip by page name. The old helper skips by number, and on this screen that number would skip Confirmation when the user already has a phone number.
    if (legalFirstName && legalLastName) {
        skippedPages.push(ADD_BANK_ACCOUNT_SUB_PAGES.LEGAL_NAME);
    }
    
    if (hasCompleteUsAddress) {
        skippedPages.push(ADD_BANK_ACCOUNT_SUB_PAGES.ADDRESS);
    }
    1. On Confirm, send the name and address with the Plaid bank. Use what the user just typed. If that page was skipped, use the name and address already saved on their profile. Always send the country as US.
    addPersonalBankAccount({
        ...bankAccountWithToken,
        legalFirstName,
        legalLastName,
        addressStreet,
        addressCity,
        addressState,
        addressZipCode,
        country: CONST.COUNTRY.US,
    }, personalPolicyID);
    1. Show the legal name and the address on the confirmation page, with a way to go back and edit them. The edit links use the page numbers below. After the bank account is saved, those rows stay on screen but can no longer be edited, same as the bank row.

    <MenuItem.Root onPress={!isBankAccountAdded ? handleModifyAccountNumbers : undefined}>
    <MenuItem.Row>
    <MenuItem.Content>
    {!!bankName && <MenuItem.FieldName>{bankName}</MenuItem.FieldName>}
    <MenuItem.FieldValue>{`${translate('bankAccount.accountEnding')} ${accountNumber.slice(-4)}`}</MenuItem.FieldValue>
    </MenuItem.Content>
    {!isBankAccountAdded && (
    <MenuItem.Trailing>
    <MenuItem.Chevron />
    </MenuItem.Trailing>
    )}
    </MenuItem.Row>
    </MenuItem.Root>

    BANK_ACCOUNT: {
        ACCOUNT_NUMBERS: 0,
        LEGAL_NAME: 1,
        ADDRESS: 2,
    },
    1. The personal info step still asks for the name and address, because date of birth sits between them. Saving the answers only makes that step open on date of birth. The Next button after date of birth still opens Address. In PersonalInfo, skip the name page and the address page when those answers are already filled in. Also copy the same answers into the personal info form, so the confirmation there can still show them. After the bank step, the user then sees date of birth, phone, and SSN.

    function getInitialSubstepForPersonalInfo(data: PersonalInfoStepProps): number {
    if (data[personalInfoKeys.FIRST_NAME] === '' || data[personalInfoKeys.LAST_NAME] === '') {
    return 0;
    }
    if (data[personalInfoKeys.DOB] === '') {
    return 1;
    }
    if (data[personalInfoKeys.STREET] === '' || data[personalInfoKeys.CITY] === '' || data[personalInfoKeys.STATE] === '' || data[personalInfoKeys.ZIP_CODE] === '') {
    return 2;
    }

    const {CurrentPage, isEditing, pageIndex, nextPage, prevPage, moveTo, isRedirecting} = useSubPage<SubPageProps, EnablePaymentsSubPageType>({
    pages: formPages,
    startFrom,
    onFinished: submit,

    setDraftValues(ONYXKEYS.FORMS.WALLET_ADDITIONAL_DETAILS, {
        legalFirstName,
        legalLastName,
        addressStreet,
        addressCity,
        addressState,
        addressZipCode,
    });
    
    useSubPage({
        pages: formPages,
        skipPages: [PERSONAL_INFO_SUB_PAGES.LEGAL_NAME, PERSONAL_INFO_SUB_PAGES.ADDRESS],
    });

    What alternative solutions did you explore? (Optional)

    Use the address form from the other add-bank flow, including its country list. That form matches the other flow, but Enable Payments has no country page, so the list never opens and State becomes a text box. The wallet address form is the one that works on this screen.

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

    TEST BRANCH

    https://github.com/Expensify/App/compare/main...samranahm:fix/100075?expand=1

    POC

    Kapture.2026-10-01.at.11.32.36.mp4
  6. github-actions commented on Sep 1, 2026

    @github-actions
    Contributor

    🤖 ProposalPolice™ is tracking duplicate proposals for this issue using an OpenAI Conversation. This comment stores that Conversation's ID and can be safely ignored.

  7. wildan-m commented on Sep 1, 2026

    @wildan-m
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Old Dot collects address information when a deposit account is set up, but New Dot does not always do so. The deposit account setup flow needs to collect the user's address when we don't already have it on file, so the reporting obligations tied to deposit accounts can be met.

    What is the root cause of that problem?

    New Dot has two entry points that create a personal deposit account, and only one of them handles the address.

    1. The standalone "Add bank account" flow (AddPersonalBankAccountPage) already has an address sub-page in its list of pages, skips it when the profile already holds a complete address, and merges the saved profile address into the payload it submits:

    const infoPages = [
    {pageName: SUB_PAGE_NAMES.INTERNATIONAL_BANK_ACCOUNT_DETAILS, component: InternationalBankAccountDetails},
    {pageName: SUB_PAGE_NAMES.LEGAL_NAME, component: LegalName},
    {pageName: SUB_PAGE_NAMES.ADDRESS, component: Address},
    {pageName: SUB_PAGE_NAMES.PHONE_NUMBER, component: PhoneNumber},
    {pageName: SUB_PAGE_NAMES.CONFIRMATION, component: Confirmation},
    {pageName: SUB_PAGE_NAMES.SUCCESS, component: Success},
    ];
    const pagesWithPlaid = [{pageName: SUB_PAGE_NAMES.PLAID_BANK_ACCOUNT, component: PlaidBankAccount}, ...infoPages];
    const pagesWithManualSetup = [{pageName: SUB_PAGE_NAMES.MANUAL_BANK_ACCOUNT_DETAILS, component: ManualBankAccountDetails}, ...infoPages];

    // When the Address substep is skipped (the profile already has a complete address), the flat
    // addressStreet/addressCity/... keys that addPersonalBankAccount expects are never written to the form draft.
    // Map the saved profile address (stored nested in the addresses array) to those flat keys so the address
    // is still submitted. The form draft spread below wins, so a manually entered address still takes precedence.
    const currentAddress = getCurrentAddress(privatePersonalDetails);
    const [addressStreet, street2] = getStreetLines(currentAddress?.street);
    // The unit/suite may be stored either embedded after a newline in `street` (extracted above) or in the
    // separate `street2`/`addressLine2` fields; fall back to those so it isn't dropped, matching UpdatePersonalBankAccountPage.
    const addressStreet2 = street2 ?? currentAddress?.street2 ?? currentAddress?.addressLine2;
    const accountData = {
    ...privatePersonalDetails,
    addressStreet,
    addressStreet2,
    addressCity: currentAddress?.city,
    addressState: currentAddress?.state,
    addressZipCode: currentAddress?.zip,
    country: currentAddress?.country,
    ...personalBankAccount,
    ...bankAccountWithToken,
    phoneNumber: formatE164PhoneNumber(finalPhoneNumber, countryCode),
    };
    if (confirmedOwnershipDetails.current) {
    accountData.confirmedOwnershipDetails = true;
    }
    addPersonalBankAccount(accountData, personalPolicyID);

    1. The wallet's deposit account step (EnablePayments → Add bank account) does not. Its page list contains only the Plaid sub-page and the confirmation sub-page — there is no address sub-page at all:

    const plaidPages = [
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.PLAID, component: Plaid},
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];
    const confirmationPageIndex = plaidPages.findIndex((page) => page.pageName === ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION);

    and its submit handler passes only the selected Plaid bank account object (bank name, account/routing numbers, Plaid access token) to addPersonalBankAccount, with no address fields attached:

    const bankAccounts = plaidData?.bankAccounts ?? [];
    const selectedPlaidBankAccount = bankAccounts.find((bankAccount) => bankAccount.plaidAccountID === personalBankAccountDraft?.plaidAccountID);
    if (selectedPlaidBankAccount) {
    const bankAccountWithToken = selectedPlaidBankAccount.plaidAccessToken
    ? selectedPlaidBankAccount
    : {
    ...selectedPlaidBankAccount,
    plaidAccessToken: plaidData?.plaidAccessToken ?? '',
    };
    addPersonalBankAccount(bankAccountWithToken, personalPolicyID);
    }

    So a user who sets up a deposit account through the wallet is never asked for an address, and the account is created without one. The address that the wallet collects later, in the KYC "personal info" step, belongs to wallet activation rather than to the deposit account, and it is not part of the deposit account creation request.

    What changes do you think we should make in order to solve the problem?

    Bring the wallet deposit account step in line with the standalone flow, so both entry points collect and submit an address.

    In src/pages/EnablePayments/Wallet/AddBankAccount/AddBankAccount.tsx:

    1. Add an address sub-page to the page list, placed between the Plaid sub-page and the confirmation sub-page, and add a matching sub-page name constant next to the existing Plaid and confirmation names in CONST. Reuse the existing address sub-page component from the standalone flow rather than writing a new one — it already renders the shared address form, pre-fills from the saved profile address, validates a physical address, and writes the flat address keys (street, street line 2, city, state, zip, country) into the personal bank account form draft:

    const updateAddress = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.HOME_ADDRESS_FORM>) => {
    const submittedAddress = {
    addressStreet: values.addressLine1?.trim() ?? '',
    addressStreet2: values.addressLine2?.trim() ?? '',
    addressCity: values.city?.trim() ?? '',
    addressState: values.state?.trim() ?? '',
    addressZipCode: values?.zipPostCode?.trim().toUpperCase() ?? '',
    country: currentCountry,
    };
    setDraftValues(ONYXKEYS.FORMS.PERSONAL_BANK_ACCOUNT_FORM, submittedAddress);
    onNext(submittedAddress);
    };

    1. Skip that new sub-page when we already have the address, so we only ask when we need to. useSubPage already accepts a list of pages to skip, and the standalone flow's helper already encodes the "do we have a complete address" rule — street, city, zip, plus a state when the country is US or Canada:

    const isUsOrCanada = currentAddress?.country === CONST.COUNTRY.US || currentAddress?.country === CONST.COUNTRY.CA;
    const hasValidState = !isUsOrCanada || !!currentAddress?.state;
    if (!!currentAddress?.street && !!currentAddress?.city && hasValidState && !!currentAddress?.zip) {
    skippedSteps.push(3);
    }

    Read the private personal details from Onyx in AddBankAccount, apply that same completeness rule, and pass the address sub-page's name in skipPages when the check passes (skipPages is a list of page names, which is why the standalone flow maps the indexes its helper returns back to names before handing them over). Extracting the address-completeness condition into a small shared helper keeps the two flows from drifting apart.

    1. Include the address in the request. In submit, build the account payload the way the standalone flow does: take the flat address keys from the personal bank account form draft when the user just entered them, and otherwise fall back to the saved profile address (splitting the street into street and street line 2, and falling back to the separate street line 2 field so a unit or suite is not dropped), then spread the selected Plaid bank account on top before calling addPersonalBankAccount.

    2. Show the address on the confirmation sub-page as an additional row, alongside the existing bank account row, with the same edit affordance that moves back to the address sub-page — so the user can review and correct what will be submitted:

    description={bankName}
    title={`${translate('bankAccount.accountEnding')} ${accountNumber.slice(-4)}`}
    shouldShowRightIcon={!isBankAccountAdded}
    interactive={!isBankAccountAdded}
    onPress={handleModifyAccountNumbers}
    />
    <View style={[styles.ph5, styles.pb5, styles.flexGrow1, styles.justifyContentEnd]}>
    {!!error && error.length > 0 && (

    The wallet's step indicator renders a fixed list of wallet step names rather than deriving anything from the sub-pages of a step, so adding one sub-page does not change the number of steps shown in the header.

    Compare branch: https://github.com/Expensify/App/compare/main...wildan-m:App:wildan/100075-deposit-account-address?expand=1

    What alternative solutions did you explore? (Optional)

    Collect the address only at submit time, by silently copying whatever address is already on the profile into the request without ever showing a sub-page. This is simpler, but it does nothing for the case the issue actually calls out — a user for whom we do not already have an address — so the deposit account would still be created without one.

  8. abbasifaizan70 commented on Sep 1, 2026

    @abbasifaizan70
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-09-30 19:25:31 UTC.

    Proposal (updated)

    Updated after @huult's review. Changes from my last version:

    • I no longer reuse the standalone AddressStep. On the wallet route its country starts empty and its country picker has no sub-route.
    • I now collect legal name too, as @nkuoch confirmed.
    • KYC no longer asks for name and address a second time.

    Please re-state the problem that we are trying to solve in this issue.

    Enable Wallet > Add bank account > Plaid creates the personal bank account (AddPersonalBankAccount) before we ask for the owner's legal name or address. If the user leaves during the next step (KYC), they keep an open bank account with no name and no address.

    What is the root cause of that problem?

    The wallet's Add bank account step has only two pages, Plaid and Confirmation:

    const plaidPages = [
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.PLAID, component: Plaid},
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];

    On Confirm, it sends only the Plaid account:

    const bankAccounts = plaidData?.bankAccounts ?? [];
    const selectedPlaidBankAccount = bankAccounts.find((bankAccount) => bankAccount.plaidAccountID === personalBankAccountDraft?.plaidAccountID);
    if (selectedPlaidBankAccount) {
    const bankAccountWithToken = selectedPlaidBankAccount.plaidAccessToken
    ? selectedPlaidBankAccount
    : {
    ...selectedPlaidBankAccount,
    plaidAccessToken: plaidData?.plaidAccessToken ?? '',
    };
    addPersonalBankAccount(bankAccountWithToken, personalPolicyID);
    }

    addPersonalBankAccount already sends legalFirstName, legalLastName and the address fields, but from this entry point they are all empty:

    phoneNumber: account?.phoneNumber,
    legalFirstName: account?.legalFirstName,
    legalLastName: account?.legalLastName,
    addressStreet: getFormattedStreet(account?.addressStreet, account?.addressStreet2),
    addressCity: account?.addressCity,
    addressState: account?.addressState,
    addressZip: account?.addressZipCode,
    addressCountry: account?.country,

    Name and address are only collected later, by KYC (PersonalInfo), which sends a different command (UpdatePersonalDetailsForWallet).

    Two more things block a simple "add an address page" fix:

    1. The standalone AddressStep doesn't work on this route. It lets the user pick a country, but the wallet route has no country sub-route, and the wallet flow is US only.
    2. KYC would ask again. KYC opens at the first empty field, and date of birth sits between name and address:
      if (data[personalInfoKeys.DOB] === '') {
      return 1;
      }
      if (data[personalInfoKeys.STREET] === '' || data[personalInfoKeys.CITY] === '' || data[personalInfoKeys.STATE] === '' || data[personalInfoKeys.ZIP_CODE] === '') {
      return 2;
      }

      So even with name and address filled in, KYC opens at DOB and then shows Address again. PersonalInfo passes no skipPages.

    What changes do you think we should make in order to solve the problem?

    KYC already has US-only Legal name and Address pages. They use a state picker, have no country picker, and validate US zip codes. They also write the exact keys addPersonalBankAccount expects (legalFirstName, legalLastName, addressStreet, addressCity, addressState, addressZipCode):

    const INPUT_IDS = {
    PERSONAL_INFO_STEP: {
    FIRST_NAME: 'legalFirstName',
    LAST_NAME: 'legalLastName',
    DOB: 'dob',
    SSN_LAST_4: 'ssn',
    STREET: 'addressStreet',
    CITY: 'addressCity',
    STATE: 'addressState',
    ZIP_CODE: 'addressZipCode',
    PHONE_NUMBER: 'phoneNumber',
    },
    } as const;

    So I will reuse those same two page components in the bank account step instead of building new ones. Their inputs save to the WALLET_ADDITIONAL_DETAILS draft as the user types, and KYC already reads that draft first (getSubstepValues). The bank account request and KYC then read from one place, and nothing has to be copied between forms.

    1. Add the pages. Add LEGAL_NAME: 'legal-name' and ADDRESS: 'address' to ENABLE_PAYMENTS.ADD_BANK_ACCOUNT_STEP.SUB_PAGE_NAMES:

      App/src/CONST/index.ts

      Lines 4101 to 4106 in ea6e334

      ADD_BANK_ACCOUNT_STEP: {
      SUB_PAGE_NAMES: {
      PLAID: 'plaid',
      CONFIRMATION: 'confirmation',
      },
      },
    import Address from '@pages/EnablePayments/Wallet/PersonalInfo/substeps/AddressStep';
    import LegalName from '@pages/EnablePayments/Wallet/PersonalInfo/substeps/LegalNameStep';
    
    const plaidPages = [
        {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.PLAID, component: Plaid},
        {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.LEGAL_NAME, component: LegalName},
        {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.ADDRESS, component: Address},
        {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];

    confirmationPageIndex is looked up by page name, so the "already added" case still opens on Confirmation.

    1. One helper for the owner details. Add a pure getWalletOwnerDetails(walletValues, privatePersonalDetails). It returns name and address from the wallet draft or walletAdditionalDetails. For any empty field, it falls back to the profile (legalFirstName/legalLastName, and getCurrentAddress + getStreetLines). A profile address outside the US is ignored, because this flow is US only. The skip rules, the Confirmation rows and the request all use this helper, so they always agree.

    2. Only ask when we don't have it. Pass skip rules by page name to useSubPage. Skip LEGAL_NAME when both names are present, and skip ADDRESS when street, city, state and zip are all present. I skip by name, not with the standalone flow's index-based getSkippedStepsPersonalInfo: in that helper, index 3 means Phone, but in the wallet list it would be Confirmation.

    3. Send it. In submit:

    const ownerDetails = getWalletOwnerDetails(walletValues, privatePersonalDetails);
    addPersonalBankAccount({...ownerDetails, country: CONST.COUNTRY.US, ...bankAccountWithToken}, personalPolicyID);
    // Values that came from the profile (skipped pages) go into the KYC draft too
    setDraftValues(ONYXKEYS.FORMS.WALLET_ADDITIONAL_DETAILS, ownerDetails);

    No API change.

    1. Review before creating. Add Legal name and Address rows to the wallet ConfirmationStep. Each row has onMove to its page (LEGAL_NAME: 1, ADDRESS: 2 in CONST.WALLET.SUBSTEP_INDEXES.BANK_ACCOUNT). The rows become read-only once the account is added, like the bank row.

      <MenuItem.Root onPress={!isBankAccountAdded ? handleModifyAccountNumbers : undefined}>
      <MenuItem.Row>
      <MenuItem.Content>
      {!!bankName && <MenuItem.FieldName>{bankName}</MenuItem.FieldName>}
      <MenuItem.FieldValue>{`${translate('bankAccount.accountEnding')} ${accountNumber.slice(-4)}`}</MenuItem.FieldValue>
      </MenuItem.Content>
      {!isBankAccountAdded && (
      <MenuItem.Trailing>
      <MenuItem.Chevron />
      </MenuItem.Trailing>
      )}
      </MenuItem.Row>
      </MenuItem.Root>

    2. Don't ask twice in KYC. In PersonalInfo, pass skipPages for LEGAL_NAME and ADDRESS when their values are complete. KYC then goes DOB → Phone → SSN → Confirmation. KYC's Confirmation still shows both rows and can open either page, because moveTo ignores skipPages.

      const startFrom = useMemo(() => getInitialSubstepForPersonalInfo(values), [values]);
      const {CurrentPage, isEditing, pageIndex, nextPage, prevPage, moveTo, isRedirecting} = useSubPage<SubPageProps, EnablePaymentsSubPageType>({
      pages: formPages,
      startFrom,
      onFinished: submit,
      buildRoute: (pageName, action) =>
      ROUTES.SETTINGS_ENABLE_PAYMENTS.getRoute({
      page: CONST.ENABLE_PAYMENTS.PAGE_NAMES.PERSONAL_INFO,
      subPage: pageName,
      action,
      }),
      });

    Expected flow (account with no name, no address, no bank account):
    Plaid → Legal name → Address (state picker, no country) → Confirmation (bank, name and address rows) → AddPersonalBankAccount sends legalFirstName, legalLastName, addressStreet, addressCity, addressState, addressZip, addressCountry=US → KYC opens on Date of birth → Phone → SSN.
    With a complete US profile, the name and address pages are skipped and the profile values are sent.

    Tests

    • getWalletOwnerDetails: wallet draft beats the profile; the profile fills only empty fields; a non-US profile address is ignored; street2 is kept.
    • Skip rules for complete, partial and empty data.
    • Wallet AddBankAccount: with an empty profile, Legal name appears after Plaid, and the submitted payload has the entered name and address.
    • PersonalInfo: with name and address filled, Next from DOB goes to Phone.

    Out of scope: existing accounts without an address (handled internally, per @nkuoch) and the Corpay flow.

    Test branch : https://github.com/Expensify/App/compare/main...abbasifaizan70:Expensify:fix/100075-wallet-owner-details?expand=1

    What alternative solutions did you explore? (Optional)

    • Reuse the standalone AddressStep (my earlier version). Its country picker has no route in the wallet flow, and the flow is US only.
    • Only prefill the KYC draft. Not enough: DOB sits between name and address, so Address still shows up again.
    • Create the account only after KYC finishes (Option B). Bigger change, and a KYC failure would drop the bank account the user just linked.
  9. KJ21-ENG commented on Sep 1, 2026

    @KJ21-ENG
    Contributor

    Proposal

    What is the root cause of that problem?

    The New Dot non-US deposit-account wizard does not independently require an address. It builds the Account holder page only from address fields returned in corpayFields.formFields, then skips that page when those returned required fields validate against the saved profile. If Corpay does not return account-holder address fields, an empty field map validates and the wizard proceeds without asking for an address.

    function getFieldsMap(corpayFields: OnyxEntry<CorpayFields>): Record<ValueOf<typeof CONST.CORPAY_FIELDS.PAGE_NAME>, CorpayFieldsMap> {
    return (corpayFields?.formFields ?? []).reduce(
    (acc, field) => {
    if (!field.id) {
    return acc;
    }
    if (field.id === CONST.CORPAY_FIELDS.ACCOUNT_TYPE_KEY) {
    acc[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_TYPE] = {[field.id]: field};
    } else if (CONST.CORPAY_FIELDS.ACCOUNT_HOLDER_FIELDS.includes(field.id)) {
    acc[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_HOLDER_DETAILS] = acc[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_HOLDER_DETAILS] ?? {};
    acc[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_HOLDER_DETAILS][field.id] = field;
    } else if (CONST.CORPAY_FIELDS.BANK_INFORMATION_FIELDS.includes(field.id)) {
    acc[CONST.CORPAY_FIELDS.PAGE_NAME.BANK_INFORMATION] = acc[CONST.CORPAY_FIELDS.PAGE_NAME.BANK_INFORMATION] ?? {};
    acc[CONST.CORPAY_FIELDS.PAGE_NAME.BANK_INFORMATION][field.id] = field;
    } else {
    acc[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_DETAILS] = acc[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_DETAILS] ?? {};
    acc[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_DETAILS][field.id] = field;
    }
    return acc;
    },
    {} as Record<ValueOf<typeof CONST.CORPAY_FIELDS.PAGE_NAME>, CorpayFieldsMap>,
    );

    const fieldsMap = getFieldsMap(corpayFields);
    const values = getSubstepValues(privatePersonalDetails, corpayFields, bankAccountList, draftValues, country, fieldsMap);
    const bankCountry = values.bankCountry;
    const shouldCollectInternationalDepositDetails = useShouldCollectInternationalDepositDetails(bankCountry);
    const initialAccountHolderDetailsValues = getInitialPersonalDetailsValues(privatePersonalDetails);
    const skipAccountTypeStep = isEmptyObject(fieldsMap[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_TYPE]);
    const skipAccountHolderInformationStep = testValidation(initialAccountHolderDetailsValues, fieldsMap[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_HOLDER_DETAILS]);
    // Skip only when collection isn't needed, or when the account details step already captured a real IBAN and a
    // SWIFT value. Completing `iban`/`swiftCode` on the dedicated step must not omit it from the wizard.
    const skipInternationalBankAccountDetailsStep = !shouldCollectInternationalDepositDetails || hasValidAccountDetailsInternationalFields(values.accountNumber, values.swiftBicCode);
    const startFrom = getInitialSubstep(values, fieldsMap, skipInternationalBankAccountDetailsStep);
    const skippedPages = [];
    if (skipInternationalBankAccountDetailsStep) {
    skippedPages.push(CONST.CORPAY_FIELDS.PAGE_NAME.INTERNATIONAL_BANK_ACCOUNT_DETAILS);
    }
    if (skipAccountTypeStep) {
    skippedPages.push(CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_TYPE);
    }
    if (skipAccountHolderInformationStep) {
    skippedPages.push(CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_HOLDER_DETAILS);

    The eventual producer is createCorpayBankAccountForWalletFlow: Confirmation passes the accumulated form values to it, and it serializes those values as the BankAccount_CreateCorpay inputs payload. Therefore a skipped address step produces a deposit-account creation payload with no independently guaranteed address data.

    const getDataAndGoToNextStep = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.INTERNATIONAL_BANK_ACCOUNT_FORM>) => {
    createCorpayBankAccountForWalletFlow({...formValues, ...values}, corpayFields?.classification ?? '', corpayFields?.destinationCountry ?? '', corpayFields?.preferredMethod ?? '');
    };

    function createCorpayBankAccountForWalletFlow(data: InternationalBankAccountForm, classification: string, destinationCountry: string, preferredMethod: string) {
    // The international details step is skipped when the Corpay bank-details step already collected equivalent values,
    // so resolve them here to guarantee the IBAN/SWIFT are always sent when we have them, whichever step captured them.
    const {iban, swiftCode} = getInternationalBankAccountDetailsValues(data.iban, data.swiftCode, data.accountNumber, data.swiftBicCode);
    const inputData = {
    ...data,
    iban,
    swiftCode,
    classification,
    destinationCountry,
    preferredMethod,
    setupType: 'manual',
    fieldsType: 'international',
    country: data.bankCountry,
    currency: data.bankCurrency,
    };
    const parameters = {
    isWithdrawal: false,
    isSavings: true,
    inputs: JSON.stringify(inputData),
    };
    const onyxData: OnyxData<typeof ONYXKEYS.REIMBURSEMENT_ACCOUNT> = {
    optimisticData: [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
    value: {
    isLoading: true,
    isCreateCorpayBankAccount: true,
    },
    },
    ],
    successData: [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
    value: {
    isLoading: false,
    isCreateCorpayBankAccount: false,
    errors: null,
    isSuccess: true,
    },
    },
    ],
    failureData: [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
    value: {
    isLoading: false,
    isCreateCorpayBankAccount: false,
    isSuccess: false,
    errors: getMicroSecondOnyxErrorWithTranslationKey('walletPage.addBankAccountFailure'),
    },
    },
    ],
    };
    return API.write(WRITE_COMMANDS.BANK_ACCOUNT_CREATE_CORPAY, parameters, onyxData);
    }

    This is a missing product requirement rather than a regression: the original international flow already derived the Account holder step entirely from Corpay-provided fields, so it never established a New Dot-owned address requirement.

    } else if (field.id in CONST.CORPAY_FIELDS.BANK_INFORMATION_FIELDS) {
    acc[CONST.CORPAY_FIELDS.STEPS_NAME.BANK_INFORMATION] = acc[CONST.CORPAY_FIELDS.STEPS_NAME.BANK_INFORMATION] ?? {};
    acc[CONST.CORPAY_FIELDS.STEPS_NAME.BANK_INFORMATION][field.id] = field;
    } else {
    acc[CONST.CORPAY_FIELDS.STEPS_NAME.BANK_ACCOUNT_DETAILS] = acc[CONST.CORPAY_FIELDS.STEPS_NAME.BANK_ACCOUNT_DETAILS] ?? {};
    acc[CONST.CORPAY_FIELDS.STEPS_NAME.BANK_ACCOUNT_DETAILS][field.id] = field;
    }
    return acc;
    }, {} as Record<ValueOf<typeof CONST.CORPAY_FIELDS.STEPS_NAME>, CorpayFieldsMap>);
    }
    function getLatestCreatedBankAccount(bankAccountList: OnyxEntry<BankAccountList>): BankAccount | undefined {
    return lodashSortBy(Object.values(bankAccountList ?? {}), 'accountData.created').pop();
    }
    function getSubstepValues(
    privatePersonalDetails: OnyxEntry<PrivatePersonalDetails>,
    corpayFields: OnyxEntry<CorpayFields>,
    bankAccountList: OnyxEntry<BankAccountList>,
    internationalBankAccountDraft: OnyxEntry<InternationalBankAccountForm>,
    country: OnyxEntry<string>,
    ): InternationalBankAccountForm {

    What changes do you think we should make in order to solve the problem?

    Add a dedicated address requirement to the non-US InternationalDepositAccount wizard, separate from the Corpay-driven Account holder fields. Use the existing current-address helper to prefill it and only skip it when the saved address has all of the required street, city, country, postal-code, and applicable state values; otherwise render the existing address-form pattern, save the completed address into the international-account draft, and advance only after validation. Keep the Corpay Account holder page for any additional country-specific fields that Corpay returns.

    * Get the current address from addresses array
    *
    * @param privatePersonalDetails - details object
    * @returns - current address object
    */
    function getCurrentAddress(privatePersonalDetails: OnyxEntry<PrivatePersonalDetails>): Address | undefined {
    const {addresses} = privatePersonalDetails ?? {};
    const currentAddress = addresses?.find((address) => address.current);
    return currentAddress ?? addresses?.[addresses.length - 1];
    }
    /**
    * Builds a PersonalDetailsForm snapshot from Onyx private details,
    * optionally layering draft values on top so in-progress edits win.
    */
    function getPrivatePersonalDetailsFormValues(privatePersonalDetails: OnyxEntry<PrivatePersonalDetails>, draftValues?: PersonalDetailsForm | null): PersonalDetailsForm {
    const address = getCurrentAddress(privatePersonalDetails);
    const [street1, street2] = getStreetLines(address?.street);
    return {
    [INPUT_IDS.LEGAL_FIRST_NAME]: draftValues?.[INPUT_IDS.LEGAL_FIRST_NAME] ?? privatePersonalDetails?.legalFirstName ?? '',
    [INPUT_IDS.LEGAL_LAST_NAME]: draftValues?.[INPUT_IDS.LEGAL_LAST_NAME] ?? privatePersonalDetails?.legalLastName ?? '',
    [INPUT_IDS.DATE_OF_BIRTH]: draftValues?.[INPUT_IDS.DATE_OF_BIRTH] ?? privatePersonalDetails?.dob ?? '',
    [INPUT_IDS.PHONE_NUMBER]: draftValues?.[INPUT_IDS.PHONE_NUMBER] ?? privatePersonalDetails?.phoneNumber ?? '',
    [INPUT_IDS.ADDRESS_LINE_1]: draftValues?.[INPUT_IDS.ADDRESS_LINE_1] ?? street1 ?? '',
    [INPUT_IDS.ADDRESS_LINE_2]: draftValues?.[INPUT_IDS.ADDRESS_LINE_2] ?? address?.street2 ?? street2 ?? '',
    [INPUT_IDS.CITY]: draftValues?.[INPUT_IDS.CITY] ?? address?.city ?? '',
    [INPUT_IDS.STATE]: draftValues?.[INPUT_IDS.STATE] ?? address?.state ?? '',
    [INPUT_IDS.ZIP_POST_CODE]: draftValues?.[INPUT_IDS.ZIP_POST_CODE] ?? address?.zip ?? '',
    [INPUT_IDS.COUNTRY]: draftValues?.[INPUT_IDS.COUNTRY] ?? address?.country ?? '',
    };

    const validator = useCallback(
    (rawValues: FormOnyxValues<typeof ONYXKEYS.FORMS.HOME_ADDRESS_FORM>): Errors => {
    // When hidden, the country input is unregistered so fall back to the country prop.
    const values = shouldHideCountrySelector ? {...rawValues, country: rawValues.country || country} : rawValues;
    const errors: Errors & {
    zipPostCode?: string | string[];
    } = {};
    const baseRequiredFields = shouldHideCountrySelector ? (['addressLine1', 'city', 'state'] as const) : (['addressLine1', 'city', 'country', 'state'] as const);
    const requiredFields = shouldRequireZip ? ([...baseRequiredFields, 'zipPostCode'] as const) : baseRequiredFields;
    // Check "State" dropdown is a valid state if selected Country is USA
    if (values.country === CONST.COUNTRY.US && !values.state) {
    errors.state = translate('common.error.fieldRequired');
    }
    // Add "Field required" errors if any required field is empty
    for (const fieldKey of requiredFields) {
    const fieldValue = values[fieldKey] ?? '';
    if (isRequiredFulfilled(fieldValue)) {
    continue;
    }
    errors[fieldKey] = translate('common.error.fieldRequired');
    }
    if (values.addressLine1.length > CONST.FORM_CHARACTER_LIMIT) {
    errors.addressLine1 = translate('common.error.characterLimitExceedCounter', values.addressLine1.length, CONST.FORM_CHARACTER_LIMIT);
    }
    if (values.addressLine2.length > CONST.FORM_CHARACTER_LIMIT) {
    errors.addressLine2 = translate('common.error.characterLimitExceedCounter', values.addressLine2.length, CONST.FORM_CHARACTER_LIMIT);
    }
    if (values.city.length > CONST.FORM_CHARACTER_LIMIT) {
    errors.city = translate('common.error.characterLimitExceedCounter', values.city.length, CONST.FORM_CHARACTER_LIMIT);
    }
    if (values.country !== CONST.COUNTRY.US && values.state.length > CONST.STATE_CHARACTER_LIMIT) {
    errors.state = translate('common.error.characterLimitExceedCounter', values.state.length, CONST.STATE_CHARACTER_LIMIT);
    }
    if (shouldValidatePhysicalAddress) {
    const addressLine1Error = getInvalidAddressErrorTranslationPath(values.addressLine1);
    if (values.addressLine1 && addressLine1Error) {
    errors.addressLine1 = translate(addressLine1Error);
    }
    const addressLine2Error = getInvalidAddressErrorTranslationPath(values.addressLine2);
    if (values.addressLine2 && addressLine2Error) {
    errors.addressLine2 = translate(addressLine2Error);
    }
    }
    // If no country is selected, default value is an empty string and there's no related regex data so we default to an empty object
    const countryRegexDetails = (values.country ? COMMON_CONST.COUNTRY_ZIP_REGEX_DATA?.[values.country] : {}) as CountryZipRegex;
    // The postal code system might not exist for a country, so no regex either for them.
    const countrySpecificZipRegex = countryRegexDetails?.regex;
    const countryZipFormat = countryRegexDetails?.samples ?? '';
    if (countrySpecificZipRegex) {
    if (!countrySpecificZipRegex.test(values.zipPostCode?.trim().toUpperCase())) {
    if (isRequiredFulfilled(values.zipPostCode?.trim())) {
    errors.zipPostCode = translate('privatePersonalDetails.error.incorrectZipFormat', countryZipFormat);
    } else {
    errors.zipPostCode = translate('common.error.fieldRequired');
    }
    }
    } else if (!COMMON_CONST.GENERIC_ZIP_CODE_REGEX.test(values?.zipPostCode?.trim()?.toUpperCase() ?? '')) {
    errors.zipPostCode = translate('privatePersonalDetails.error.incorrectZipFormat');
    }
    return errors;
    },
    [translate, shouldHideCountrySelector, country, shouldRequireZip, shouldValidatePhysicalAddress],

    Update getSubstepValues and the Corpay creation payload boundary so the address collected or prefetched by that new step is always included in the submitted inputs, rather than being omitted when the Corpay field map lacks accountHolderAddress* entries. Do not change the Corpay server-field mapping: it remains responsible for rendering provider-specific account-holder, bank, and regional fields.

    function getSubstepValues(
    privatePersonalDetails: OnyxEntry<PrivatePersonalDetails>,
    corpayFields: OnyxEntry<CorpayFields>,
    bankAccountList: OnyxEntry<BankAccountList>,
    internationalBankAccountDraft: OnyxEntry<InternationalBankAccountForm>,
    country: OnyxEntry<string>,
    fieldsMap: Record<ValueOf<typeof CONST.CORPAY_FIELDS.PAGE_NAME>, CorpayFieldsMap>,
    ): InternationalBankAccountForm {
    const address = getCurrentAddress(privatePersonalDetails);
    const personalDetailsFieldMap = fieldsMap[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_HOLDER_DETAILS];
    const {street} = address ?? {};
    const [street1, street2] = street ? street.split('\n') : [undefined, undefined];
    const firstName = privatePersonalDetails?.legalFirstName ?? '';
    const lastName = privatePersonalDetails?.legalLastName ?? '';
    const fullName = `${firstName} ${lastName}`.trim() ? `${firstName} ${lastName}`.trim() : undefined;
    const latestBankAccount = getLatestCreatedBankAccount(bankAccountList);
    return {
    ...internationalBankAccountDraft,
    bankCountry: internationalBankAccountDraft?.bankCountry ?? corpayFields?.bankCountry ?? address?.country ?? latestBankAccount?.bankCountry ?? country ?? '',
    bankCurrency: internationalBankAccountDraft?.bankCurrency ?? corpayFields?.bankCurrency,
    accountHolderName: !isEmptyObject(personalDetailsFieldMap?.accountHolderName) ? (internationalBankAccountDraft?.accountHolderName ?? fullName) : undefined,
    accountHolderAddress1: !isEmptyObject(personalDetailsFieldMap?.accountHolderAddress1) ? (internationalBankAccountDraft?.accountHolderAddress1 ?? street1) : undefined,
    accountHolderAddress2: !isEmptyObject(personalDetailsFieldMap?.accountHolderAddress2) ? (internationalBankAccountDraft?.accountHolderAddress2 ?? street2) : undefined,
    accountHolderCity: !isEmptyObject(personalDetailsFieldMap?.accountHolderCity) ? (internationalBankAccountDraft?.accountHolderCity ?? address?.city) : undefined,
    accountHolderCountry: !isEmptyObject(personalDetailsFieldMap?.accountHolderCountry)
    ? (internationalBankAccountDraft?.accountHolderCountry ?? corpayFields?.bankCountry ?? address?.country ?? latestBankAccount?.bankCountry ?? country ?? '')
    : undefined,
    accountHolderPostal: !isEmptyObject(personalDetailsFieldMap?.accountHolderPostal) ? (internationalBankAccountDraft?.accountHolderPostal ?? address?.zip) : undefined,
    accountHolderPhoneNumber: !isEmptyObject(personalDetailsFieldMap?.accountHolderPhoneNumber)
    ? (internationalBankAccountDraft?.accountHolderPhoneNumber ?? privatePersonalDetails?.phoneNumber)
    : undefined,
    } as unknown as InternationalBankAccountForm;

    function createCorpayBankAccountForWalletFlow(data: InternationalBankAccountForm, classification: string, destinationCountry: string, preferredMethod: string) {
    // The international details step is skipped when the Corpay bank-details step already collected equivalent values,
    // so resolve them here to guarantee the IBAN/SWIFT are always sent when we have them, whichever step captured them.
    const {iban, swiftCode} = getInternationalBankAccountDetailsValues(data.iban, data.swiftCode, data.accountNumber, data.swiftBicCode);
    const inputData = {
    ...data,
    iban,
    swiftCode,
    classification,
    destinationCountry,
    preferredMethod,
    setupType: 'manual',
    fieldsType: 'international',
    country: data.bankCountry,
    currency: data.bankCurrency,
    };
    const parameters = {
    isWithdrawal: false,
    isSavings: true,
    inputs: JSON.stringify(inputData),
    };

    Path coverage:

    • The Wallet and purpose/verification entry paths converge on this wizard, so the new shared subpage covers each non-US manual deposit-account setup route.
    • Selecting a US/Canada-flow country deliberately stays on SETTINGS_ADD_US_BANK_ACCOUNT; that existing wizard already shows Address unless the saved address is complete and maps it into the creation data.
    • Resumed and deep-linked non-US wizard routes use getInitialSubstep, so the new completeness check must select the address page before any later Corpay or confirmation page.
    • Editing Corpay account-holder details remains unchanged; the independent address requirement is not skipped merely because Corpay did not request an address field.

    function CountrySelection({isEditing, onNext, onMove, formValues, fieldsMap}: CustomSubPageProps) {
    const [isUserValidated] = useOnyx(ONYXKEYS.ACCOUNT, {selector: isUserValidatedSelector});
    const [selectedCountry, setSelectedCountry] = useState(formValues.bankCountry || '');
    const onCountrySelected = useCallback(() => {
    if (COUNTRIES_US_BANK_FLOW.includes(selectedCountry)) {
    if (isUserValidated) {
    Navigation.navigate(ROUTES.SETTINGS_ADD_US_BANK_ACCOUNT_ENTRY_POINT);
    } else {
    Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.VERIFY_ACCOUNT.path));
    }
    return;
    }
    if (!isEmptyObject(fieldsMap) && formValues.bankCountry === selectedCountry) {
    onNext();
    return;
    }
    fetchCorpayFields(selectedCountry);
    onMove(CONST.CORPAY_FIELDS.INDEXES.MAPPING.BANK_ACCOUNT_DETAILS, false);
    }, [fieldsMap, formValues.bankCountry, onMove, isUserValidated, onNext, selectedCountry]);

    const finalPhoneNumber = personalBankAccount?.phoneNumber ?? privatePersonalDetails?.phoneNumber ?? '';
    // When the Address substep is skipped (the profile already has a complete address), the flat
    // addressStreet/addressCity/... keys that addPersonalBankAccount expects are never written to the form draft.
    // Map the saved profile address (stored nested in the addresses array) to those flat keys so the address
    // is still submitted. The form draft spread below wins, so a manually entered address still takes precedence.
    const currentAddress = getCurrentAddress(privatePersonalDetails);
    const [addressStreet, street2] = getStreetLines(currentAddress?.street);
    // The unit/suite may be stored either embedded after a newline in `street` (extracted above) or in the
    // separate `street2`/`addressLine2` fields; fall back to those so it isn't dropped, matching UpdatePersonalBankAccountPage.
    const addressStreet2 = street2 ?? currentAddress?.street2 ?? currentAddress?.addressLine2;
    const accountData = {
    ...privatePersonalDetails,
    addressStreet,
    addressStreet2,
    addressCity: currentAddress?.city,
    addressState: currentAddress?.state,
    addressZipCode: currentAddress?.zip,
    country: currentAddress?.country,
    ...personalBankAccount,
    ...bankAccountWithToken,
    phoneNumber: formatE164PhoneNumber(finalPhoneNumber, countryCode),
    };
    if (confirmedOwnershipDetails.current) {
    accountData.confirmedOwnershipDetails = true;
    }
    addPersonalBankAccount(accountData, personalPolicyID);
    };
    const pages = isManual ? pagesWithManualSetup : pagesWithPlaid;
    const skipPages = getSkippedStepsPersonalInfo(privatePersonalDetails, shouldCollectInternationalDepositDetails)
    .map((index) => pages.at(index)?.pageName)
    .filter((pageName): pageName is NonNullable<typeof pageName> => !!pageName);

    function getSkippedStepsPersonalInfo(data: Partial<PrivatePersonalDetails> | undefined, shouldCollectInternationalDepositDetails: boolean): number[] {
    const currentAddress = getCurrentAddress(data);
    const skippedSteps = [];
    // US page 1 never has an IBAN or SWIFT/BIC, so this step is omitted only when collection is not needed.
    if (!shouldCollectInternationalDepositDetails) {
    skippedSteps.push(1);
    }
    if (!!data?.legalFirstName && !!data?.legalLastName) {
    skippedSteps.push(2);
    }
    const isUsOrCanada = currentAddress?.country === CONST.COUNTRY.US || currentAddress?.country === CONST.COUNTRY.CA;
    const hasValidState = !isUsOrCanada || !!currentAddress?.state;
    if (!!currentAddress?.street && !!currentAddress?.city && hasValidState && !!currentAddress?.zip) {
    skippedSteps.push(3);
    }
    if (data?.phoneNumber) {
    skippedSteps.push(4);
    }
    return skippedSteps;

    Test coverage:

    • Add unit coverage for the international-flow initial-step/skip decision with a complete profile address, no address, and partial address (including US state requirements).
    • Add a unit test that the Corpay-create data assembled from a draft includes the collected address even when the Corpay account-holder field map has no address fields.
    • Manually verify Wallet setup, purpose/verification setup, and a non-US deep link: an account with no saved address is stopped at the address page, while a complete saved address is prefilled/skipped and reaches confirmation with address data present.

    What alternative solutions did you explore? (Optional)

    The strongest alternative is to have GetCorpayBankAccountFields return address fields for every country and rely on the existing Account holder page. That leaves a reporting requirement owned by New Dot dependent on provider-specific server metadata; an empty or non-required Corpay response can still validate and skip the page. Another alternative is to add a client-side check only in Confirmation. That would catch the symptom late and requires users to backtrack through a route that was already allowed to initialize past the missing data. A dedicated, initial-step-aware address subpage is the narrowest shared fix: it enforces the New Dot requirement before confirmation while retaining the provider-driven Account holder fields for their separate purpose.

  10. trasnake87 commented on Sep 1, 2026

    @trasnake87
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-10-01 01:10:49 UTC.

    Updated 2026-10-01: rewritten for the Enable Wallet flow confirmed in this thread (the earlier version targeted the international deposit wizard). Test branch and recordings are at the end.

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Enable wallet > Add bank account fires AddPersonalBankAccount the moment Confirm is pressed on the Plaid account, with its name and address parameters left empty. The wallet asks for a legal name and home address only on the step after that, so closing the flow in between leaves a live deposit account whose owner name and address were never recorded.

    What is the root cause of that problem?

    Nothing is collected between picking the Plaid account and pressing Confirm, because the step's page list holds just those two screens:

    const plaidPages = [
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.PLAID, component: Plaid},
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];

    and the submit callback builds the request from the selected Plaid account alone:

    const submit = useCallback(() => {
    // Re-submitting an already added bank account fails with a "bank account already exists" error, so skip the
    // API call and advance the wallet step instead; the URL correction in EnablePaymentsPage navigates forward.
    if (isBankAccountAlreadyAdded) {
    updateCurrentStep(CONST.WALLET.STEP.ADDITIONAL_DETAILS);
    return;
    }
    const bankAccounts = plaidData?.bankAccounts ?? [];
    const selectedPlaidBankAccount = bankAccounts.find((bankAccount) => bankAccount.plaidAccountID === personalBankAccountDraft?.plaidAccountID);
    if (selectedPlaidBankAccount) {
    const bankAccountWithToken = selectedPlaidBankAccount.plaidAccessToken
    ? selectedPlaidBankAccount
    : {
    ...selectedPlaidBankAccount,
    plaidAccessToken: plaidData?.plaidAccessToken ?? '',
    };
    addPersonalBankAccount(bankAccountWithToken, personalPolicyID);
    }

    The action can already put a legal name and address into the request; this entry point never supplies them:

    const parameters: AddPersonalBankAccountParams = {
    addressName: account?.setupType === CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL ? `${account?.legalFirstName} ${account?.legalLastName}` : account.addressName,
    routingNumber: account?.routingNumber,
    accountNumber: account?.accountNumber,
    isSavings: account.isSavings ?? false,
    setupType: account?.setupType,
    bank: account?.bankName,
    plaidAccountID: account?.plaidAccountID,
    plaidAccessToken: account?.plaidAccessToken,
    phoneNumber: account?.phoneNumber,
    legalFirstName: account?.legalFirstName,
    legalLastName: account?.legalLastName,
    addressStreet: getFormattedStreet(account?.addressStreet, account?.addressStreet2),
    addressCity: account?.addressCity,
    addressState: account?.addressState,
    addressZip: account?.addressZipCode,
    addressCountry: account?.country,
    confirmedOwnershipDetails: account?.confirmedOwnershipDetails,
    };

    What changes do you think we should make in order to solve the problem?

    1. Insert two pages after the Plaid picker, Legal name and Address. The name page reuses LegalNameStep from AddPersonalBankAccountPage. The address page is US-only on the shared address form: the country is fixed to US with no picker, the state is a picker, and the ZIP is checked as a US ZIP.
    2. Skip each page when the saved profile value already passes the app's own checks (isValidLegalName, isValidAddress, isValidZipCode). A current address outside the US is treated as missing, since the wallet only takes US accounts; one saved with no country counts as US, the same default BankAccountUtils applies to legacy accounts. A partly saved US address is pre-filled, so only the missing fields need typing, and a saved unit is kept only while the street is unchanged.
    3. List the legal name and address on Confirmation. If anything is still incomplete, Confirm opens the first incomplete page instead of submitting. AddPersonalBankAccount then carries the legal name and the whole address, with the country set to US.
    4. Carry the confirmed name and address into the personal info step and drop its name and address pages once they are complete, so it starts on the first page that still needs a value (date of birth for a new user). Back on the first page it shows goes to the bank step, as Back from Legal name does today. The values travel in the form draft, which a new session or another device doesn't have, so when the draft lacks them the step reads the profile's legal name and current US address instead (the AddPersonalBankAccount response saves both there).

    The phone number stays in the personal info step, which sets it behind a validate code because it is used for card 3DS:

    * Shared validateCode handling for the wallet KYC personal-details flows. Setting a phone number, whether for the first
    * time or changing an existing one, is protected by a validateCode because it is used for card 3DS verification, so
    * both flows send the user to a dedicated confirmation screen to enter the code before the change is submitted.
    */
    function useWalletPhoneValidateCode() {
    const [privatePersonalDetails] = useOnyx(ONYXKEYS.PRIVATE_PERSONAL_DETAILS);
    // Submits the personal details, first routing to the validateCode screen when a phone number is being set to a new
    // value. Setting a phone for the first time must be protected too: it is used for card 3DS verification, so an
    // attacker who gains account access before any phone is on file could otherwise set one without a code.

    Without a phone on the account, the wallet shows its existing "Review" badge, which opens the phone page.

    Test branch: main...trasnake87:App:100075-wallet-address (7 files, with 19 unit tests in tests/unit/getAccountHolderDetailsTest.ts).

    POC, a local build of the branch against the staging API, with Plaid sandbox and a test account created for this:

    Key frames from the new-account run

    • New account: the name and address pages, Back keeping the values, leaving before Confirm (no bank account is added), Confirm, then personal info starting at date of birth with the name and address already filled in.
    • Second run, name and address already saved (same account, after deleting the first run's bank account): Next on the Plaid screen goes straight to Confirmation with the saved name and address. Personal info then opens on its review page because the first run's unsubmitted date of birth, phone and SSN were still in the local draft.
    • New session: with the bank account already added, sign out and back in (the sign-in itself is cut), so the local draft is gone. Enable wallet opens at date of birth, skips the address page, and its confirmation lists the profile's name and address. I also captured the UpdatePersonalDetailsForWallet request that Confirm builds, without letting it reach the server: it carried that legal name and address.

    In the first two runs, each AddPersonalBankAccount request included legalFirstName, legalLastName, addressStreet, addressCity, addressState, addressZip and addressCountry: US, and returned jsonCode 200.

  11. wildan-m commented on Sep 1, 2026

    @wildan-m
    Contributor

    Proposal updated — added compare branch with implementation.

  12. David-2002065 commented on Sep 1, 2026

    @David-2002065
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2026-09-30 13:45:30 UTC.

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    From an account with no bank account yet, Enable Wallet > Add Bank Account > Plaid > choose the account calls AddPersonalBankAccount right away, before we have the owner's legal name or address. If the user leaves during the KYC step that follows, they keep an open personal bank account with no name and no address. We need to collect both (only when we don't already have them) before the account is created, like AddPersonalBankAccountPage does, and KYC must not ask for the same name/address again.

    What is the root cause of that problem?

    The owner data lives in two separate forms that never talk to each other, and the one that feeds AddPersonalBankAccount is never filled from this entry point.

    1. The wallet bank step has nowhere to collect it and sends nothing. Its page list is Plaid and Confirmation only:

    const plaidPages = [
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.PLAID, component: Plaid},
    {pageName: ADD_BANK_ACCOUNT_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];

    and submit passes only the Plaid account:

    const submit = useCallback(() => {
    // Re-submitting an already added bank account fails with a "bank account already exists" error, so skip the
    // API call and advance the wallet step instead; the URL correction in EnablePaymentsPage navigates forward.
    if (isBankAccountAlreadyAdded) {
    updateCurrentStep(CONST.WALLET.STEP.ADDITIONAL_DETAILS);
    return;
    }
    const bankAccounts = plaidData?.bankAccounts ?? [];
    const selectedPlaidBankAccount = bankAccounts.find((bankAccount) => bankAccount.plaidAccountID === personalBankAccountDraft?.plaidAccountID);
    if (selectedPlaidBankAccount) {
    const bankAccountWithToken = selectedPlaidBankAccount.plaidAccessToken
    ? selectedPlaidBankAccount
    : {
    ...selectedPlaidBankAccount,
    plaidAccessToken: plaidData?.plaidAccessToken ?? '',
    };
    addPersonalBankAccount(bankAccountWithToken, personalPolicyID);
    }

    addPersonalBankAccount already maps name and address from PERSONAL_BANK_ACCOUNT_FORM keys, so from here all of them go up empty:

    legalFirstName: account?.legalFirstName,
    legalLastName: account?.legalLastName,
    addressStreet: getFormattedStreet(account?.addressStreet, account?.addressStreet2),
    addressCity: account?.addressCity,
    addressState: account?.addressState,
    addressZip: account?.addressZipCode,
    addressCountry: account?.country,

    2. KYC reads a different form, so anything the bank step collects is invisible to it. Wallet KYC works on WALLET_ADDITIONAL_DETAILS (draft first, then server data), picks its start page from the first empty value, and always walks every page after that:

    const formPages = [
    {pageName: PERSONAL_INFO_SUB_PAGES.LEGAL_NAME, component: LegalName},
    {pageName: PERSONAL_INFO_SUB_PAGES.DATE_OF_BIRTH, component: DateOfBirth},
    {pageName: PERSONAL_INFO_SUB_PAGES.ADDRESS, component: Address},
    {pageName: PERSONAL_INFO_SUB_PAGES.PHONE_NUMBER, component: PhoneNumber},
    {pageName: PERSONAL_INFO_SUB_PAGES.SSN, component: SocialSecurityNumber},
    {pageName: PERSONAL_INFO_SUB_PAGES.CONFIRMATION, component: Confirmation},
    ];
    function PersonalInfoPage() {
    const {translate} = useLocalize();
    const [walletAdditionalDetails] = useOnyx(ONYXKEYS.WALLET_ADDITIONAL_DETAILS);
    const [walletAdditionalDetailsDraft] = useOnyx(ONYXKEYS.FORMS.WALLET_ADDITIONAL_DETAILS_DRAFT);
    const showIdologyQuestions = walletAdditionalDetails?.questions && walletAdditionalDetails?.questions.length > 0;
    const {submitPersonalDetails} = useWalletPhoneValidateCode();
    const values = useMemo(() => getSubstepValues(PERSONAL_INFO_STEP_KEYS, walletAdditionalDetailsDraft, walletAdditionalDetails), [walletAdditionalDetails, walletAdditionalDetailsDraft]);
    const submit = () => {
    submitPersonalDetails(getWalletPersonalDetailsParams(values));
    };
    const startFrom = useMemo(() => getInitialSubstepForPersonalInfo(values), [values]);
    const {CurrentPage, isEditing, pageIndex, nextPage, prevPage, moveTo, isRedirecting} = useSubPage<SubPageProps, EnablePaymentsSubPageType>({
    pages: formPages,
    startFrom,
    onFinished: submit,
    buildRoute: (pageName, action) =>
    ROUTES.SETTINGS_ENABLE_PAYMENTS.getRoute({
    page: CONST.ENABLE_PAYMENTS.PAGE_NAMES.PERSONAL_INFO,
    subPage: pageName,
    action,
    }),
    });

    function getInitialSubstepForPersonalInfo(data: PersonalInfoStepProps): number {
    if (data[personalInfoKeys.FIRST_NAME] === '' || data[personalInfoKeys.LAST_NAME] === '') {
    return 0;
    }
    if (data[personalInfoKeys.DOB] === '') {
    return 1;
    }
    if (data[personalInfoKeys.STREET] === '' || data[personalInfoKeys.CITY] === '' || data[personalInfoKeys.STATE] === '' || data[personalInfoKeys.ZIP_CODE] === '') {
    return 2;
    }

    DOB sits between Legal name and Address, so even with name and address filled, KYC starts at DOB and then shows Address again. That's why just adding pages to the bank step (what most proposals do) still asks twice: nothing hands the values over and nothing skips the pages. Also Back uses pageIndex === 0, which breaks once the first page is skipped.

    3. The standalone address page can't be dropped into this route. Its country comes from the saved address with no US fallback, so with no address on file it's empty and State becomes free text, and its country picker navigates to a sub-route the wallet flow doesn't have:

    const [currentCountry, setCurrentCountry] = useState<string | undefined>(draftCountry ?? address?.country ?? defaultCountry ?? CONST.COUNTRY.US);
    const [state, setState] = useState<string | undefined>(draftState ?? address?.state);
    const [city, setCity] = useState<string | undefined>(address?.city);
    const [zipcode, setZipcode] = useState<string | undefined>(address?.zip);
    useEffect(() => {
    if (!address) {
    return;
    }
    setState(draftState ?? address?.state);
    setCurrentCountry(draftCountry ?? address?.country);
    setCity(address?.city);
    setZipcode(address?.zip);
    }, [address?.state, address?.country, address?.city, address?.zip, address, draftCountry, draftState]);

    On top of that the standalone skip rule treats any complete address as "on file" (getSkippedStepsPersonalInfo), including a UK one. The wallet is US only, so reusing that rule here would skip the page and send a non-US address for a US account, and then hand it to KYC.

    What changes do you think we should make in order to solve the problem?

    Collect in the bank step, send it with the account, hand the same values to KYC. All under src/pages/EnablePayments/Wallet.

    1. Add Legal name and Address sub-pages to the bank step. ADD_BANK_ACCOUNT_STEP.SUB_PAGE_NAMES gets LEGAL_NAME and ADDRESS, flow becomes Plaid > Legal name > Address > Confirmation. Legal name reuses the standalone LegalNameStep (same PERSONAL_BANK_ACCOUNT_FORM). Address is a small wallet substep on the shared SubStepForms/AddressStep, the same US-only form KYC uses (state picker, no country picker), with country pinned to US and only a US profile address used as prefill.

    2. Skip only what we really have, by page name. Legal name is skipped when the profile has first + last name. Address is skipped only for a complete US profile address (hasCompleteUSAddress), for the reason in RC 3. Shared hasLegalName / hasCompleteAddress helpers go in PersonalDetailsUtils so the standalone getSkippedStepsPersonalInfo uses the same checks.

    3. One resolver for what we send. New pure getBankAccountOwnerDetails(privatePersonalDetails, draft):

    name    = draft value ?? profile value
    address = draft has an address (entered, or edited from Confirmation) or profile has no complete US address
                ? draft address, country US   // never mixes in the profile's unit/country
                : profile address (street2/addressLine2 kept), country US
    

    submit sends {...draft, ...ownerDetails, ...plaidAccount} to addPersonalBankAccount, and the Confirmation page shows Legal name and Address rows from the same resolver (with edit links while the account isn't added yet), so what the user reviews is exactly what goes up.

    4. Hand it to KYC and skip those pages there. Right after addPersonalBankAccount we write the resolved name/address into the WALLET_ADDITIONAL_DETAILS draft (same key names KYC already reads). In PersonalInfo, getSkippedPagesForPersonalInfo(values) returns LEGAL_NAME / ADDRESS when their fields are complete and is passed as skipPages. It's decided once on open (useState initializer), so typing a name in KYC doesn't hide that page from Back. Back to the bank step then checks pageIndex <= firstPageIndex instead of === 0. KYC flow becomes DOB > Phone > SSN > Confirmation, and name/address are still editable from its Confirmation.

    Existing accounts without an address are out of scope (Expensify/Expensify#625091).

    Tests (added, passing): resolver for skipped pages (profile values + unit kept), entered values, partial UK profile + typed US address (no UK unit/country leak), address edited from Confirmation wins; hasCompleteUSAddress for US/UK/empty; KYC skip for full, partial and empty data.

    Test branch: https://github.com/Expensify/App/compare/main...dilshodmackbook-sketch:App:claude/100075-wallet-add-bank-account-address?expand=1

    What alternative solutions did you explore? (Optional)

    • Reuse the standalone AddressStep in the wallet route. Breaks for users with no address (empty country, dead country picker), see RC 3.
    • Only prefill KYC from the bank step, without skipping. Still shows name and address a second time because DOB sits between them, which is the "asks twice" problem.
    • Create the bank account only after KYC finishes. Also closes the gap but reshuffles the whole wallet flow, and a KYC failure would leave the Plaid selection dangling.
  13. oqildev commented on Sep 1, 2026

    @oqildev
    Contributor

    Proposal

    What is the root cause of that problem?

    This is a spec gap rather than a regression, so what follows is what specifically blocks the desired behavior today.

    The deposit account setup flow is SCREENS.SETTINGS.ADD_BANK_ACCOUNT → InternationalDepositAccount → InternationalDepositAccountContent, which is the component that renders the wizard steps. It already has an address step — AccountHolderInformation, index 5 in pages.

    The step just almost never runs. Whether it does is decided entirely by Corpay:

    const skipAccountHolderInformationStep = testValidation(initialAccountHolderDetailsValues, fieldsMap[CONST.CORPAY_FIELDS.PAGE_NAME.ACCOUNT_HOLDER_DETAILS]);

    testValidation only fails a field when Corpay marked it isRequired:

    function testValidation(values: InternationalBankAccountForm, fieldsMap: CorpayFieldsMap = {}) {
    for (const fieldName in fieldsMap) {
    if (!fieldName) {
    continue;
    }
    if (fieldsMap[fieldName].isRequired && (values[fieldName] ?? '') === '') {
    return false;
    }
    for (const rule of fieldsMap[fieldName].validationRules) {
    const regExpCheck = new RegExp(rule.regEx);
    if (!regExpCheck.test(values[fieldName] ?? '')) {
    return false;
    }
    }
    }
    return true;
    }

    Corpay's per-country formFields mark the account-holder address components optional wherever its own KYC threshold allows it. With accountHolderAddress1/City/Postal optional, an empty address passes testValidation, so the step gets pushed into skippedPages and the user is never asked. Nothing downstream re-imposes it — getInitialSubstep uses the same predicate, so a resumed or deep-linked flow also lands straight on Confirmation.

    So the gap is narrow and specific: New Dot has no Expensify-owned floor on address requiredness — it inherits Corpay's. Old Dot has its own floor; that's the whole difference.

    Worth noting the address does already flow correctly when we have one: getSubstepValues seeds it from getCurrentAddress(privatePersonalDetails) and it reaches the payload. The only broken case is the user who has no address on file, which is exactly the "if we do not already have it" half of the ask.

    What changes do you think we should make in order to solve the problem?

    Put an Expensify-side requiredness floor over the account-holder fields map. This is the selector/data layer, and I'd pick it because the flow's five consumers — step values, the skip decision, the resumed-flow entry point, the rendered inputs and the confirmation summary — all read requiredness off that one map, so one change keeps them consistent by construction.

    There's already an exact precedent for this in the same file: getAccountDetailsFieldsMap force-marks Corpay fields required for IBAN/SWIFT. I'd mirror it:

    // CONST.CORPAY_FIELDS
    ACCOUNT_HOLDER_ADDRESS_FIELDS: ['accountHolderAddress1', 'accountHolderCity', 'accountHolderRegion', 'accountHolderCountry', 'accountHolderPostal']
    
    // utils.ts — applied inside getFieldsMap before it returns, so every consumer agrees
    nextFields[fieldName] = ACCOUNT_HOLDER_ADDRESS_FIELDS.includes(fieldName) && !field.isRequired
        ? {...field, isRequired: true}
        : field;

    Two things I want to call out about this shape:

    "Collect it only if we don't already have it" falls out for free. getInitialPersonalDetailsValues already seeds from the user's stored address, so once the fields are required, testValidation passes for a user we already hold a complete address for — step still skipped, no new friction — and fails for a user we don't. No new "do we have an address" flag to keep in sync.

    Only fields Corpay actually returned get touched. The per-country list is what tells us which components even exist (no postal code where the country has none), so we never invent one and never send Corpay a key it didn't ask for.

    It's also bypass-proof rather than merely narrowed: the same predicate already guards getInitialSubstep, so a user can't deep-link or resume past the step while the address is missing — there's no ordering in which the flow reaches Confirmation without one.

    Verification. I wrote the patch and ran it against both a unit suite and a real component render.
    tests/unit/InternationalDepositAccountUtilsTest.ts: 5/5 before, 11/11 after (5 existing + 6 new).
    I also added tests/ui/DepositAccountAddressStepTest.tsx, which renders the actual InternationalDepositAccount
    page with a Corpay response whose address components are optional and a user we hold no address for.
    On unpatched main that render lands straight on Confirmation and the address step never mounts;
    with the patch it mounts and renders the Address Line 1 input. Across both files: 4 failed / 9 passed on
    main, 13/13 with the patch
    . Wider net: 184/184 across InternationalDepositAccountUtilsTest,
    DepositAccountAddressStepTest, BankAccountUtilsTest, BankAccountsTest, ReimbursementAccountUtilsTest
    and WalletPageUtilsTest; tsc --noEmit clean on the touched files.

    Boundary cases verified passing both before and after: a user who already has a complete address still skips
    the step, and a country whose Corpay list has no postal field doesn't get one invented.

    What alternative solutions did you explore? (Optional)

    Gate flow entry on the profile address and redirect to ROUTES.SETTINGS_ADDRESS (src/ROUTES.ts#L2424) before the wizard starts. Rejected: the deposit account's address is country-shaped — accountHolderRegion and accountHolderPostal exist only where Corpay returns them — and a single profile address can't express that. It also wouldn't fix the payload, which is assembled only from keys present in the fields map (utils.ts#L69-L75).

    Block submission from the Confirmation step when the address is empty. Rejected: by that point the address keys are already undefined, and AccountHolderInformation renders only the fields present in the map (AccountHolderInformation.tsx#L98-L99) — so the user would hit a dead-end error with no input rendered to resolve it.

    Adding a brand-new standalone address step would also gather the data, but the flow already ships an account-holder address step at index 5, so that route duplicates a step rather than fixing why the existing one is skipped.

    Deferred: if Corpay omits the address fields entirely for some country, forcing requiredness is a no-op there and we'd need to inject synthetic fields with our own labels and translations. I can't confirm from the client whether any country's formFields omits accountHolderAddress1 — that's a backend response — so I'd rather not build for it speculatively. Worth a follow-up if BE confirms it happens.

  14. marufsharifi commented on Sep 2, 2026

    @marufsharifi
    Contributor

    @coleaeason @nkuoch, I don’t see a C+ assigned yet. I’m available and happy to take it over as C+. Feel free to assign it to me. Thanks!

  15. 106 remaining items

  16. melvin-bot commented on Oct 14, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  17. neerajbachani commented on Oct 14, 2026

    @neerajbachani
    Contributor

    Investigated the link to deploy blocker #103942. This does not look like a regression from this PR.

    The QA repro is the IOU pay flow (Pay with personal bank account → wallet setup → magic code with a different phone). That path uses AdditionalDetailsStep, which this PR does not change. Name and address are still collected there before submit.

    What matches the video and Melvin’s analysis on the issue is #103409: after the magic code, a failed UpdatePersonalDetailsForWallet (e.g. MissingFieldError with empty onyxData) is treated as success, and the pay flow navigates back to the same step instead of advancing to Onfido, so the magic code screen can repeat. Reverting or fixing forward on #103409 is the right place to unblock the deploy.

    Separate from the deploy blocker: this PR can leave the Settings → Wallet → Personal Info path with name/address only on the profile/draft resolver while the magic code page still builds the request from the wallet form draft (WalletConfirmValidateCodePage + getSubstepValues). That gap can send incomplete data when the phone changes and the code page opens. That is worth a follow up fix (e.g. persist submitted values before opening the code page, and/or surface failureData on updatePersonalDetails), but it is not the same as the continuous loop on the IOU pay flow called out in #103942.

    Happy to help on a follow up if the team wants the draft/code-page path tightened in this area.

    cc: @huult

  18. huult commented on Oct 15, 2026

    @huult
    Contributor

    Investigated the link to deploy blocker #103942. This does not look like a regression from this PR.

    @neerajbachani This ticket was resolved.

  19. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Oct 15, 2026
  20. melvin-bot commented on Oct 15, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  21. melvin-bot commented on Oct 15, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    Upwork Job

    • Reviewer: @huult owed $250 via NewDot
    • Assignee: @neerajbachani requires payment (Needs manual offer from BZ)

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  22. huult commented on Oct 16, 2026

    @huult
  23. mallenexpensify commented on Oct 18, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @neerajbachani paid $250 via Upwork
    Contributor+: @huult due $250 via NewDot

    @neerajbachani can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022104848244433145481

  24. neerajbachani commented on Oct 18, 2026

    @neerajbachani
    Contributor

    @mallenexpensify I've accepted the job offer, thanks!

  25. mallenexpensify commented on Oct 18, 2026

    @mallenexpensify
    Contributor

    @neerajbachani paid, summary updated above. Thx.

  26. JmillsExpensify commented on Nov 14, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @huult

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions