Skip to content

fix(ramps-controller): wait for final KYC approval - #11243

Merged
roz0n merged 2 commits into
mainfrom
fix/TRAM-4392-moonpay-limbo
Nov 2, 2026
Merged

roz0n merged 2 commits into
mainfrom
fix/TRAM-4392-moonpay-limbo

Conversation

@roz0n

@roz0n roz0n commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

RampsController.hydrateVbaOnboarding currently treats either the relay-side kycStatus or the provider-side finalStatus as final KYC approval.

MoonPay/Iron clarified that relay approval only represents document processing; it does not confirm that the provider has accepted the customer.

This change makes finalStatus === 'approved' the only approval gate. A session with kycStatus: 'approved' and finalStatus: 'pending' now stays pending and does not begin customer or autoramp setup.

This intentionally supersedes the behavior introduced in #10497.

Demo with mobile changes applied:

Screen.Recording.iPhone.17.Pro.11-02-2026.at.5.23.11.PM.mp4

References

Verification

  • yarn workspace @metamask/ramps-controller test --run (1,128 tests)
  • yarn workspace @metamask/ramps-controller build
  • yarn lint:oxlint packages/ramps-controller/src/RampsController.ts packages/ramps-controller/src/RampsController.test.ts
  • yarn lint:misc --check packages/ramps-controller/src/RampsController.ts packages/ramps-controller/src/RampsController.test.ts

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes when VBA onboarding reports KYC approved and unlocks wallet/autoramp steps, which affects money-account UX and reverses prior relay-first behavior.

Overview
VBA onboarding now treats only provider finalStatus: 'approved' as KYC approved, reversing the behavior from #10497 where relay kycStatus: 'approved' could advance users while the vendor was still pending.

resolveVbaKycStatus no longer ORs in relay approval; relay-approved sessions with a pending finalStatus stay kycStatus: 'pending', so hydrateVbaOnboarding returns early and does not surface needs_wallet_registration or other post-approval autoramp states. When the provider has approved but relay kycStatus still lags, finalStatus still wins and onboarding can proceed.

Tests and the changelog document the relay/vendor divergence cases.

Reviewed by Cursor Bugbot for commit 015df72. Bugbot is set up for automated code reviews on this repo. Configure here.

roz0n and others added 2 commits November 2, 2026 15:19
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@roz0n
roz0n force-pushed the fix/TRAM-4392-moonpay-limbo branch from 4cc1967 to 015df72 Compare November 2, 2026 21:36
@roz0n
roz0n marked this pull request as ready for review November 2, 2026 21:37
@roz0n
roz0n requested review from a team as code owners November 2, 2026 21:37
@roz0n
roz0n temporarily deployed to default-branch November 2, 2026 21:37 — with GitHub Actions Inactive
@roz0n

roz0n commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@roz0n
roz0n added this pull request to the merge queue Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@11.2.0-preview-015df72e5
@metamask-previews/accounts-controller@40.1.0-preview-015df72e5
@metamask-previews/address-book-controller@8.0.0-preview-015df72e5
@metamask-previews/advanced-chart-core@1.0.0-preview-015df72e5
@metamask-previews/ai-controllers@2.0.0-preview-015df72e5
@metamask-previews/analytics-controller@4.1.0-preview-015df72e5
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-015df72e5
@metamask-previews/announcement-controller@9.0.0-preview-015df72e5
@metamask-previews/app-metadata-controller@3.0.0-preview-015df72e5
@metamask-previews/approval-controller@10.0.0-preview-015df72e5
@metamask-previews/assets-controller@20.1.0-preview-015df72e5
@metamask-previews/assets-controllers@113.0.1-preview-015df72e5
@metamask-previews/authenticated-user-storage@4.1.0-preview-015df72e5
@metamask-previews/base-controller@10.1.0-preview-015df72e5
@metamask-previews/base-data-service@2.1.0-preview-015df72e5
@metamask-previews/bitcoin-regtest-up@2.0.0-preview-015df72e5
@metamask-previews/bridge-controller@83.1.3-preview-015df72e5
@metamask-previews/bridge-status-controller@78.0.1-preview-015df72e5
@metamask-previews/build-utils@4.0.0-preview-015df72e5
@metamask-previews/byte-utils@0.1.0-preview-015df72e5
@metamask-previews/chain-agnostic-permission@2.1.0-preview-015df72e5
@metamask-previews/chomp-api-service@7.0.0-preview-015df72e5
@metamask-previews/claims-controller@1.1.0-preview-015df72e5
@metamask-previews/client-controller@2.0.0-preview-015df72e5
@metamask-previews/client-utils@3.1.0-preview-015df72e5
@metamask-previews/compliance-controller@3.0.0-preview-015df72e5
@metamask-previews/composable-controller@13.0.0-preview-015df72e5
@metamask-previews/config-registry-controller@5.0.0-preview-015df72e5
@metamask-previews/connectivity-controller@1.0.0-preview-015df72e5
@metamask-previews/controller-utils@13.0.0-preview-015df72e5
@metamask-previews/core-backend@13.0.0-preview-015df72e5
@metamask-previews/cryptography@1.1.2-preview-015df72e5
@metamask-previews/delegation-controller@4.0.0-preview-015df72e5
@metamask-previews/earn-controller@13.0.2-preview-015df72e5
@metamask-previews/eip-5792-middleware@4.1.0-preview-015df72e5
@metamask-previews/eip-7702-internal-rpc-middleware@1.0.0-preview-015df72e5
@metamask-previews/eip1193-permission-middleware@3.0.0-preview-015df72e5
@metamask-previews/error-utils@0.1.0-preview-015df72e5
@metamask-previews/eth-block-tracker@16.0.0-preview-015df72e5
@metamask-previews/eth-json-rpc-middleware@26.0.0-preview-015df72e5
@metamask-previews/eth-json-rpc-provider@7.0.0-preview-015df72e5
@metamask-previews/foundryup@2.0.0-preview-015df72e5
@metamask-previews/gas-fee-controller@27.0.0-preview-015df72e5
@metamask-previews/gator-permissions-controller@6.1.0-preview-015df72e5
@metamask-previews/geolocation-controller@2.0.0-preview-015df72e5
@metamask-previews/java-tron-up@2.0.0-preview-015df72e5
@metamask-previews/json-rpc-engine@11.0.0-preview-015df72e5
@metamask-previews/json-rpc-middleware-stream@9.0.0-preview-015df72e5
@metamask-previews/keyring-controller@28.2.0-preview-015df72e5
@metamask-previews/kyc-controller@0.14.0-preview-015df72e5
@metamask-previews/local-node-utils@2.0.0-preview-015df72e5
@metamask-previews/logging-controller@10.0.0-preview-015df72e5
@metamask-previews/marketing-consent-controller@1.1.0-preview-015df72e5
@metamask-previews/message-manager@15.0.0-preview-015df72e5
@metamask-previews/messenger@3.0.0-preview-015df72e5
@metamask-previews/messenger-cli@1.0.0-preview-015df72e5
@metamask-previews/mfa-recovery-controller@0.0.0-preview-015df72e5
@metamask-previews/money-account-api-data-service@2.3.1-preview-015df72e5
@metamask-previews/money-account-balance-service@3.1.2-preview-015df72e5
@metamask-previews/money-account-controller@3.0.0-preview-015df72e5
@metamask-previews/money-account-lifecycle-controller@0.0.0-preview-015df72e5
@metamask-previews/money-account-mfa-whitelist@0.1.0-preview-015df72e5
@metamask-previews/money-account-upgrade-controller@6.0.0-preview-015df72e5
@metamask-previews/money-account-utils@2.2.0-preview-015df72e5
@metamask-previews/multichain-account-service@14.1.0-preview-015df72e5
@metamask-previews/multichain-api-middleware@5.0.0-preview-015df72e5
@metamask-previews/multichain-network-controller@4.0.0-preview-015df72e5
@metamask-previews/multichain-transactions-controller@8.0.0-preview-015df72e5
@metamask-previews/name-controller@10.0.0-preview-015df72e5
@metamask-previews/network-connection-banner-controller@1.0.0-preview-015df72e5
@metamask-previews/network-controller@37.1.1-preview-015df72e5
@metamask-previews/network-enablement-controller@7.1.0-preview-015df72e5
@metamask-previews/node-utils@0.1.0-preview-015df72e5
@metamask-previews/notification-services-controller@30.1.0-preview-015df72e5
@metamask-previews/passkey-controller@4.1.0-preview-015df72e5
@metamask-previews/permission-controller@14.1.0-preview-015df72e5
@metamask-previews/permission-log-controller@6.0.0-preview-015df72e5
@metamask-previews/perps-controller@22.1.0-preview-015df72e5
@metamask-previews/phishing-controller@18.3.0-preview-015df72e5
@metamask-previews/platform-api-docs@0.2.1-preview-015df72e5
@metamask-previews/polling-controller@17.0.0-preview-015df72e5
@metamask-previews/preferences-controller@24.0.0-preview-015df72e5
@metamask-previews/profile-controller@1.2.1-preview-015df72e5
@metamask-previews/profile-metrics-controller@5.2.1-preview-015df72e5
@metamask-previews/profile-sync-controller@36.0.0-preview-015df72e5
@metamask-previews/ramps-controller@28.1.0-preview-015df72e5
@metamask-previews/rate-limit-controller@8.0.0-preview-015df72e5
@metamask-previews/react-data-query@2.0.0-preview-015df72e5
@metamask-previews/remote-feature-flag-controller@7.0.0-preview-015df72e5
@metamask-previews/sample-controllers@6.0.0-preview-015df72e5
@metamask-previews/seedless-onboarding-controller@12.0.0-preview-015df72e5
@metamask-previews/selected-network-controller@27.0.0-preview-015df72e5
@metamask-previews/sentinel-api-service@2.1.0-preview-015df72e5
@metamask-previews/shield-controller@7.1.1-preview-015df72e5
@metamask-previews/signature-controller@40.0.0-preview-015df72e5
@metamask-previews/smart-transactions-controller@27.2.1-preview-015df72e5
@metamask-previews/snap-account-service@4.0.0-preview-015df72e5
@metamask-previews/social-controllers@3.15.0-preview-015df72e5
@metamask-previews/solana-test-validator-up@2.0.0-preview-015df72e5
@metamask-previews/stellar-quickstart-up@0.0.0-preview-015df72e5
@metamask-previews/storage-service@2.0.0-preview-015df72e5
@metamask-previews/subscription-controller@15.1.2-preview-015df72e5
@metamask-previews/transaction-controller@73.0.0-preview-015df72e5
@metamask-previews/transaction-pay-controller@30.3.2-preview-015df72e5
@metamask-previews/transaction-pay-middleware@2.0.1-preview-015df72e5
@metamask-previews/type-utils@0.1.0-preview-015df72e5
@metamask-previews/user-operation-controller@42.1.0-preview-015df72e5
@metamask-previews/utils@12.0.1-preview-015df72e5
@metamask-previews/wallet@21.0.0-preview-015df72e5
@metamask-previews/watch-only-account-service@0.1.0-preview-015df72e5

Merged via the queue into main with commit 1959873 Nov 2, 2026
84 of 93 checks passed
@roz0n
roz0n deleted the fix/TRAM-4392-moonpay-limbo branch November 2, 2026 21:58
@roz0n roz0n mentioned this pull request Nov 2, 2026
4 tasks done
Naz-Ovh pushed a commit to 0x-fork/metamask-core that referenced this pull request Nov 4, 2026
## Explanation

Releases:
- `@metamask/ramps-controller` @ `29.0.0`
- `@metamask/transaction-pay-controller` @ `30.3.3`

This release includes the VBA KYC final-status fix from MetaMask#11243 and
customer rail abilities from MetaMask#11225. The major bump reflects the new
required `NeoBankService:getCustomerAbilities` messenger action.

## References

- MetaMask#11243
- MetaMask#11225
- Consumer update: MetaMask/metamask-mobile#38688

## 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
- [x] I’ve introduced breaking changes in this PR and have prepared a
draft pull request for clients and consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> The diff is low-risk versioning, but it publishes ramps-controller
29.0.0 with a breaking messenger delegation requirement that downstream
clients must adopt before upgrading.
> 
> **Overview**
> This PR **cuts release 1381.0.0** by bumping versions and lockfile
entries only—no application source changes in the diff.
> 
> **`@metamask/ramps-controller`** goes **28.1.0 → 29.0.0** (major). The
changelog section for **29.0.0** is finalized from `[Unreleased]`,
documenting what ships with this tag: customer rail abilities
APIs/state, deposit-rail readiness helpers, a **breaking** requirement
to delegate **`NeoBankService:getCustomerAbilities`**, plus VBA KYC
**`finalStatus`** and microdeposits session-profile fixes from earlier
PRs.
> 
> **`@metamask/transaction-pay-controller`** is patched to **30.3.3**
with **`@metamask/ramps-controller` ^29.0.0** and a matching changelog
entry. Root **`package.json`** moves to **1381.0.0**; **`yarn.lock`**
reflects the ramps-controller resolution bump.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1272c95. 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: Cursor <cursoragent@cursor.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Naz-Ovh pushed a commit to 0x-fork/metamask-core that referenced this pull request Nov 4, 2026
…eased (MetaMask#11257)

## Explanation

MetaMask#10882 (migrate `NeoBankService` to `BaseDataService`) merged right
after Release 1381.0.0 (MetaMask#11248), which had already cut
`@metamask/ramps-controller` 29.0.0. Because of how the changelog
merged, the MetaMask#10882 entries ended up in the released `[29.0.0]` section,
while `[Unreleased]` was left empty.

## References

- Follow-up to MetaMask#10882
- Related to MetaMask#11248

## 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)
- [ ] 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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation-only changelog reorganization with no runtime or API
changes.
> 
> **Overview**
> Corrects a **Keep a Changelog** mix-up in
`packages/ramps-controller/CHANGELOG.md` after Release 1381.0.0 cut
`29.0.0` while MetaMask#10882 merged: **NeoBankService → `BaseDataService`**
notes (MetaMask#10882) were listed under **`[29.0.0]`** even though they had not
shipped yet.
> 
> This PR **moves** those MetaMask#10882 bullets (Added / Changed / Removed,
including breaking `NeoBankService` and
`RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS` items that belonged to that
work) back into **`[Unreleased]`**, and **leaves `[29.0.0]`** with only
what actually released there (MetaMask#11225 customer abilities /
`refreshCustomerAbilities` / deposit rail readiness, MetaMask#11243 KYC
`finalStatus`, and related fixes). **Wording is unchanged**—only section
placement.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
a2e1a1a. 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: Salah-Eddine Saakoun <salah-eddinesaakoun@Salah-Eddines-MacBook-Pro-2.local>
weitingsun pushed a commit to Poovarasan-Sandhanam/metamask-mobile that referenced this pull request Nov 6, 2026
…38688)

## **Description**

MoonPay relay approval means document processing completed, but the
provider can still be reviewing the customer. Mobile previously treated
relay-side `kycStatus: approved` as terminal even when provider-side
`finalStatus` remained pending,

- This change keeps the KYC pending screen and Money home card active
until `finalStatus` becomes terminal.
- The pending card now uses the animated design-system spinner and opens
the already-known pending destination immediately, without flashing a
standalone loading screen.

> [!NOTE]
> - This PR consumes the corrected onboarding snapshot semantics from
[MetaMask/core#11243](MetaMask/core#11243).
> - Upgrades `@metamask/ramps-controller` to `29.0.0` and
`@metamask/transaction-pay-controller` to `30.3.3` to consume the Core
fix and maintain compatible dependencies.

## **Changelog**

CHANGELOG entry: Fixed Money Account identity verification advancing
before provider approval

## **Related issues**

Refs: https://consensyssoftware.atlassian.net/browse/TRAM-4392

## **Manual testing steps**

```gherkin
Feature: Money Account provider-final KYC approval

  Scenario: relay approval remains pending while the provider reviews the customer
    Given I have submitted Money Account identity verification
    And the relay KYC status is approved
    And the provider final status is pending

    When I open Money
    Then I should see the "Verifying your identity" card
    And its "Verifying" indicator should animate

    When I tap "Verifying"
    Then the "Verifying your identity" screen should open immediately
    And I should not see an intermediate full-screen loader
    And status polling should continue

  Scenario: provider-final approval completes identity verification
    Given I am on the "Verifying your identity" screen

    When the provider final status becomes approved
    Then onboarding should advance from the pending state
```

## **Screenshots/Recordings**

### **Before**

N/A

### **After**


https://github.com/user-attachments/assets/2d641ae3-59c4-472d-9932-18f1f1923c86

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

#### Performance checks (if applicable)

- [x] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [x] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [x] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **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 the help of the pr-description AI skill -->

Made with [Cursor](https://cursor.com)


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes Money Account KYC gating and onboarding routing, which are
compliance-sensitive, though behavior is narrowed to wait for provider
finalization with broad test coverage.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
02c055c. 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: Cursor <cursoragent@cursor.com>

This branch was previously deployed

1 inactive deployment
default-branch — 015df72e Deployed Nov 2, 2026 by roz0n via Determine whether this PR is a release PR #6359
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants