Skip to content

feat(kyc): KYC owns the vendor terms page - #38815

Draft
georgeweiler wants to merge 3 commits into
gw/kyc-per-vendor-sessionsfrom
gw/kyc-owns-vendor-terms
Draft

georgeweiler wants to merge 3 commits into
gw/kyc-per-vendor-sessionsfrom
gw/kyc-owns-vendor-terms

Conversation

@georgeweiler

@georgeweiler georgeweiler commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Stacked on #38814.

VBA's opening screen (CreateVirtualBankAccount) did two jobs at once: it was VBA's product pitch and Iron's terms page. KYC should own each vendor's terms, so the next feature (Kalshi) can reuse the same screen. This PR splits the two jobs.

  • New KYC/Views/VendorTerms screen, parameterised by vendor. It loads that vendor's catalog for the user's country, stores acceptance on the KYC controller (not yet submitted), and reports back. Callers can add documents (VBA adds MoonPay's privacy policy, TRAM-4169) and receive viewed / accepted / failed events to record their own analytics. The KYC screen imports nothing from VBA.
  • useKycDisclaimers moves to KYC/hooks/useVendorDisclaimers and takes the vendor.
  • VBA's opening screen keeps the product content and its "Get account details" button, which now continues into the KYC terms screen. Until the KYC module has its own navigator, VBA's navigator hosts that screen at a new VbaKycVendorTerms route.

Assumption needing design sign-off: VBA keeps a separate opening screen, so onboarding gains one screen. The alternative is that the product content moves somewhere else.

Differences to review:

  • The terms screen labels documents with the catalog's display_name. The old single-document "MoonPay's Terms and Conditions" label (TRAM-4169) is gone.
  • The terms copy is new and generic (kyc_vendor_terms.*).
  • Screen-performance tracking stays on the VBA opening screen. The terms screen has none yet.
  • E2E selectors for the terms moved from CreateVirtualBankAccountSelectorsIDs to VendorTermsSelectorsIDs.

CI will fail for the same reason as #38814 (the core change in MetaMask/core#11399 isn't released), and some unit tests for the moved hook and the opening screen still need updating.

Changelog

CHANGELOG entry: Moved the bank account terms and conditions onto their own screen during virtual bank account setup

Related issues

Refs: MetaMask/core#11399

Manual testing steps

Feature: KYC-owned vendor terms

  Scenario: user starts VBA onboarding without accepted terms
    Given a wallet with no KYC session and no accepted Iron terms
    When user opens VBA onboarding
    Then the VBA opening screen shows the product content and no terms
    When user taps "Get account details"
    Then the KYC terms screen lists MoonPay's privacy policy and Iron's documents
    When user taps "Agree and continue"
    Then sessions.iron.vendorDisclaimersAccepted is stored with submitted: false
    And onboarding continues to the email step

Verified on the iOS simulator against locally built core packages: the Money home card opens the product-only opening screen, "Get account details" opens the KYC terms screen (MoonPay's privacy policy plus Iron's catalog document), and "Agree and continue" stores sessions.iron.vendorDisclaimersAccepted with submitted: false. Hydrate then reports vendorTermsAcceptedLocally: true, and onboarding moves to the email step.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • 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.

🤖 Generated with Claude Code

Description

Stacked on #38814. Rebased onto that branch after it was rebased onto main.

VBA's opening screen (CreateVirtualBankAccount) did two jobs at once: it was VBA's product pitch and Iron's terms page. KYC should own each vendor's terms, so the next feature (Kalshi) can reuse the same screen. This PR splits the two jobs.

  • New KYC/Views/VendorTerms screen, parameterised by vendor. It loads that vendor's catalog for the user's country, stores acceptance on the KYC controller (not yet submitted), and reports back. Callers can add documents (VBA adds MoonPay's privacy policy, TRAM-4169) and receive viewed / accepted / failed events to record their own analytics. The KYC screen imports nothing from VBA.
  • useKycDisclaimers moves to KYC/hooks/useVendorDisclaimers and takes the vendor.
  • VBA's opening screen keeps the product content and its "Get account details" button, which now continues into the KYC terms screen. Until the KYC module has its own navigator, VBA's navigator hosts that screen at a new VbaKycVendorTerms route.
  • The local-user-secret prefetch moved with the catalog fetch, onto VendorTerms. The opening screen leaves its button busy after a successful continue, so Fabric does not re-parent the label while the screen is leaving.

Assumption needing design sign-off: VBA keeps a separate opening screen, so onboarding gains one screen. The alternative is that the product content moves somewhere else.

Differences to review:

  • The terms screen labels documents with the catalog's display_name. The old single-document "MoonPay's Terms and Conditions" label (TRAM-4169) is gone.
  • The terms copy is new and generic (kyc_vendor_terms.*).
  • The opening screen still reports the vendor_terms screen-performance id. The terms screen reports kyc_vendor_terms.
  • E2E selectors for the terms moved from CreateVirtualBankAccountSelectorsIDs to VendorTermsSelectorsIDs.

CI will fail for the same reason as #38814 (the core change in MetaMask/core#11399 isn't released).

Changelog

CHANGELOG entry: Moved the bank account terms and conditions onto their own screen during virtual bank account setup

Related issues

Refs: MetaMask/core#11399

Manual testing steps

Feature: KYC-owned vendor terms

  Scenario: user starts VBA onboarding without accepted terms
    Given a wallet with no KYC session and no accepted Iron terms
    When user opens VBA onboarding
    Then the VBA opening screen shows the product content and no terms
    When user taps "Get account details"
    Then the KYC terms screen lists MoonPay's privacy policy and Iron's documents
    When user taps "Agree and continue"
    Then sessions.iron.vendorDisclaimersAccepted is stored with submitted: false
    And onboarding continues to the email step

Verified on the iOS simulator against locally built core packages, before this rebase: the Money home card opens the product-only opening screen, "Get account details" opens the KYC terms screen (MoonPay's privacy policy plus Iron's catalog document), and "Agree and continue" stores sessions.iron.vendorDisclaimersAccepted with submitted: false. Hydrate then reports vendorTermsAcceptedLocally: true, and onboarding moves to the email step.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • 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.

🤖 Generated with Claude Code

Open in Web Open in Cursor 

@github-actions github-actions Bot added the size-L label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamask-ci metamask-ci Bot added the team-money-movement issues related to Money Movement features label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Smart E2E Test Selection

Selected E2E tags: ALL

AI Confidence: 100

E2E reasoning

Expand to read

Hard-rule seed (en.json locale change) selects ALL, and I kept it as the floor. The en.json diff only adds new kyc_vendor_terms keys, so existing selectors are not affected. The app changes add KYC VendorTerms and Virtual Bank Account (Ramp) screens and navigation. The test-infra change is a comment-only edit in the component-view mocks. Actual risk is probably limited to Ramp/Money flows, but I did not check smoke specs for VBA coverage, so I did not narrow the selection.

View run

georgeweiler and others added 3 commits November 10, 2026 19:16
VBA's opening screen used to double as Iron's terms page. Split it: VBA
keeps the product pitch, and a new KYC-owned VendorTerms screen loads the
vendor's catalog, stores acceptance on the KYC controller and reports back.

- New KYC/Views/VendorTerms screen, parameterised by vendor; callers can
  add documents (VBA adds MoonPay's privacy policy) and receive viewed /
  accepted / failed events for their own analytics
- useKycDisclaimers moves to KYC/hooks/useVendorDisclaimers and takes a
  vendor
- VBA's opening screen continues into the KYC terms screen, hosted in the
  VBA navigator until the KYC module has its own navigator

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the local-user-secret prefetch onto VendorTerms with the catalog
fetch, give the new route its own KYC screen-performance id, and port
the opening-screen terms tests onto the terms screen.

Co-authored-by: george.weiler <george.weiler@consensys.net>

This branch has not been deployed

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

Labels

size-XL team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants