Repository navigation
feat(ramps): add VBA onboarding stage hydration - #10278
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
georgeweiler
temporarily deployed
to
default-branch
September 17, 2026 01:41 — with
GitHub Actions
Inactive
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop local KycVendor/KycProvider/KycStatus stubs and action types in favor of the package exports introduced in #10279. Co-authored-by: Cursor <cursoragent@cursor.com>
…t on hydrate Before reading the VBA stage gates, hydrateVbaOnboarding now calls KycController:refreshVbaOnboardingStatus so each stage reflects the vendor account (vendor-terms re-signing, KYC status) rather than only device-local state. The action is declared as a local structural messenger-action type so the ramps package does not require a kyc-controller release that already exports it (the KYC PR merges first). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Closed
8 of 10 tasks
… 0.4.0 session API
8 of 10 tasks
…not finalStatus finalStatus is already 'pending' once the session + consents exist (pre-SumSub), so route to KycRequired until vendorStatus/kycStatus leaves 'new'/'retry'; only show KycPending once the applicant has actually submitted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
@metamaskbot release previews |
…, registration) - Read session status from refreshSessionStatus (in-memory) so the SumSub outcome is seen immediately; the backend latest-status endpoint lags. - Gate KycRequired on kycStatus 'new'/'retry'; KycPending once submitted. - Treat a 404 'no session' from getSessionStatusForVendor as start-at-email. - Money-account registration failure after approval keeps the user on 'verification in progress' (retryable) instead of the error screen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0c50d9f. Configure here.
…esh changelog + lockfile Declare the KYC messenger action types and KycVendor structurally in the ramps package instead of importing from @metamask/kyc-controller, dropping the dependency (which was pinned to ^0.3.0 while the monorepo moved to 0.4.0 and broke the immutable-lockfile check). Update the changelog to the session-status based hydration API. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…p removal Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tus API Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
georgeweiler
enabled auto-merge
September 21, 2026 17:02
roz0n
approved these changes
Sep 21, 2026
pull Bot
pushed a commit
to Reality2byte/core
that referenced
this pull request
Sep 21, 2026
## Explanation Cut `@metamask/ramps-controller@24.0.0` so Mobile can consume VBA onboarding hydration from MetaMask#10278, plus a required patch of `@metamask/transaction-pay-controller@29.0.1` because it is a workspace dependent of that major bump. Ramps is a **major** because hosts must wire four new `KycController` messenger actions on `RampsControllerMessenger`. ## References - Core feature: MetaMask#10278 - Mobile consumer (draft): MetaMask/metamask-mobile#36522 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [x] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them ## Test plan - [ ] Changelog for `@metamask/ramps-controller` 24.0.0 looks correct (no Uncategorized) - [ ] Changelog for `@metamask/transaction-pay-controller` 29.0.1 looks correct (no Uncategorized) - [ ] Published packages: ramps-controller `23.0.0` → `24.0.0`, transaction-pay-controller `29.0.0` → `29.0.1` - [ ] After merge, confirm GitHub release tags and npm publish of both packages <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > The major ramps release forces client messenger wiring for KYC hydration; this PR only cuts versions but downstream apps must upgrade integrations before adopting 24.0.0. > > **Overview** > Release **1268.0.0** publishes **`@metamask/ramps-controller@24.0.0`**, packaging the VBA onboarding and NeoBank autoramp work from MetaMask#10278 that was previously under `[Unreleased]`. The changelog section is finalized (including a minor formatting fix on an older breaking-change bullet), and compare links are updated for the new tag. > > The ramps bump is a **major** because consumers must delegate four **`KycController`** messenger actions on **`RampsControllerMessenger`** for VBA onboarding hydration (along with the other 24.0.0 API additions already documented there). > > **`@metamask/transaction-pay-controller`** is patched to **`29.0.1`** so its dependency moves from **`@metamask/ramps-controller@^23.0.0`** to **`^24.0.0`**, with matching **`package.json`**, changelog, and **`yarn.lock`** updates. No application logic changes appear in this diff—only versioning and release metadata. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 20f97cc. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Amitabh Aggarwal <aggarwal.amitabh@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks done
pull Bot
pushed a commit
to Reality2byte/core
that referenced
this pull request
Sep 23, 2026
…en stage (MetaMask#10354) ## Explanation `RampsController:hydrateVbaOnboarding` currently returns a linear `VbaOnboardingStage` and persists it. That encodes product funnel order in Core, so a design change such as putting vendor terms before email requires a controller release. This PR keeps Core responsible for backend onboarding facts and money-account activation while removing screen and route concepts: - `hydrateVbaOnboarding` returns a `VbaOnboardingSnapshot` containing `sessionExists`, disclaimer completion flags, `kycStatus`, `finalStatus`, and `activation`. - The persisted `vbaOnboardingStage` state field and `VbaOnboardingStage` enum are removed. - After `finalStatus === 'approved'`, wallet registration and autoramp creation still run as a coalesced operation. - Activation failures return `activation: 'retryable_failure'` instead of turning hydration into a fatal error. - A persisted KYC session owned by a previous identity is cleared and represented as an empty snapshot. Mobile owns the funnel in MetaMask/metamask-mobile#36522. Its current sequence is MoonPay Terms 1 → Iron email → session Terms 2 → SumSub. Entry and resume points hydrate this snapshot, while successful local actions advance optimistically. ## References - Replaces the stage contract introduced by MetaMask#10278 - Mobile consumer: MetaMask/metamask-mobile#36522 - Overlaps the foreign-session discard in MetaMask#10337; that PR will need to rebase onto this snapshot return type if both land ## Testing - Updated `RampsController` unit coverage for every snapshot branch, including empty, pending, approved, rejected, retryable activation failure, and foreign-session reset states. - Verified the locally built package in MetaMask Mobile through a dist overlay; Mobile resolves `hydrateVbaOnboarding` as `Promise<VbaOnboardingSnapshot>` with no remaining stage API references. ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [x] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
vbaOnboardingStagecontract for Mobile routinghydrateVbaOnboardingrefreshes KYC state from the customer's account viaKycController:refreshVbaOnboardingStatusbefore reading the stage gates, then maps Iron/SumSub getters (KycVendor/KycProvider/KycStatusfrom feat(kyc-controller): add VBA onboarding KYC getters #10279) to a routable stagekyc-controllerrelease that already exports it (KYC PR merges first)NeoBankService:getAutorampsaction before deciding whether account creation is neededThis is a simplified replacement for #10116. KYC flow interpretation stays in
KycController; this PR imports the shared enums/action types from@metamask/kyc-controllerrather than declaring them locally.Depends on: #10279 (KYC getters + VBA status refresh). Until that lands, this branch is expected not to typecheck against main's
kyc-controllerpackage — that is intentional.The proxy is expected to support authenticated
GET /neobank/autorampsrequests.Testing
yarn jest src/NeoBankService.test.ts src/RampsController.test.ts --runInBand --no-coverageyarn workspace @metamask/ramps-controller run testyarn build(may fail until feat(kyc-controller): add VBA onboarding KYC getters #10279 merges)yarn workspace @metamask/ramps-controller run messenger-action-types:checkyarn changelog:validate🤖 Generated with Claude Code
Note
Medium Risk
Touches KYC-gated money-account activation (wallet signing and autoramp creation) and expands the required messenger surface, so host wiring mistakes or race bugs could affect onboarding.
Overview
Adds Mobile VBA onboarding routing via a persisted
vbaOnboardingStageandRampsController:hydrateVbaOnboarding, which derives the next screen from Iron/SumSub KYC session state (email OTP, vendor/provider terms, SumSub, pending/rejected, or completed).After KYC is approved, hydration registers the Money Account wallet, loads the customer’s autoramps through new
NeoBankService:getAutoramps(GET /neobank/autoramps), syncs local autoramp state, and creates an autoramp only when none is usable for the wallet; transient neobank failures keep the user on KycPending instead of completing. Overlapping hydration calls are coalesced to avoid duplicate signatures or autoramp creation during polling.Breaking: integrators must wire four new
KycControllermessenger actions (getSessionStatusForVendor,refreshSessionStatus, and the two disclaimer checks). Action types are declared structurally in ramps-controller so it does not add a@metamask/kyc-controllerdependency.Reviewed by Cursor Bugbot for commit 6e0eb4b. Bugbot is set up for automated code reviews on this repo. Configure here.