Repository navigation
feat(ramps-controller): read US bank deposit details from autoramps - #10878
Merged
saustrie-consensys merged 5 commits intoOct 21, 2026
Merged
Conversation
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
This was referenced Oct 19, 2026
An incomplete PIX stub was labeling the autoramp as BRL even when the readable rail was ACH.
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
An empty PIX instruction is not a complete rail, and a later autoramp snapshot that omits currency no longer clears one the client already stored.
Contributor
Author
|
@metamaskbot publish-preview |
Keep the unreleased US bank deposit notes ahead of the released 27.0.2 section.
saustrie-consensys
enabled auto-merge
October 21, 2026 13:21
georgeweiler
approved these changes
Oct 21, 2026
saustrie-consensys
deleted the
saustrie/ramps-us-bank-deposit-instructions
branch
October 21, 2026 14:33
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 21, 2026
## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## 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](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** > Version and dependency bumps only; functional changes were merged in prior PRs and are documented in the ramps-controller 27.1.0 changelog. > > **Overview** > **Release 1350.0.0** cuts the monorepo from `1349.0.0` to `1350.0.0` and publishes **`@metamask/ramps-controller@27.1.0`** by finalizing its changelog (moving the existing Unreleased notes into `[27.1.0]`) and bumping the package version from `27.0.2`. > > **`@metamask/transaction-pay-controller`** is updated to depend on **`@metamask/ramps-controller@^27.1.0`** (from `^27.0.2`), with a matching changelog entry and **`yarn.lock`** refresh. There are **no application source changes** in this diff—only version, changelog, and lockfile updates. > > The **27.1.0** release notes being shipped include neo-bank **deposit instructions** (`getDepositInstructions`, US bank types/rails), **`depositRailsSummary.currency`** mapping fixes, and related autoramp snapshot behavior from earlier PRs ([#10878], etc.). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 150a304. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Poovarasan-Sandhanam
pushed a commit
to Poovarasan-Sandhanam/metamask-mobile
that referenced
this pull request
Oct 21, 2026
…sk#37739) ## **Description** Stacked on [MetaMask#37737](MetaMask#37737). Part of TRAM-4130. The account details screen could only show PIX. This PR lets it show whichever deposit rail the autoramp has: - **US bank transfer layout** from the "VBA Created / US Details Page" Figma frame: "Add money by bank transfer", then copyable rows for account holder, routing number, account number, and bank name, then Done. The Figma frame also has an "Account type: Checking" row. MoonPay's US rails (`ACH`, `Wire`, `RTP`, `FedNow`) have no account type field, so that row is left out rather than hard-coded. Until the final illustration is ready, the existing `bank-transfer.png` stands in for the PIX logo. - **Reader.** The screen calls `NeoBankService.getDepositInstructions`, added in [MetaMask/core#10878](MetaMask/core#10878). It falls back to `getPixDepositInstructions` when the installed ramps-controller does not have the new method yet, so this PR works before and after the bump. - **Copy.** The loading and waiting strings no longer say PIX ("Loading account details", "Your account details appear here once the account is approved."). US users still create BRL accounts. Once the ramps-controller release with `getDepositInstructions` is installed, a follow-up commit bumps the package and adds `USD` to `VBA_CURRENCIES_WITH_DEPOSIT_DETAILS` in `getVbaSourceCurrency.ts`. That commit is what turns on USD creation. ## **Changelog** CHANGELOG entry: null ## **Related issues** Refs: [TRAM-4130](https://consensyssoftware.atlassian.net/browse/TRAM-4130) ## **Manual testing steps** ```gherkin Feature: Money Account deposit details by rail Scenario: Brazilian user sees PIX details Given the wallet has an Approved BRL autoramp with a PIX rail When user opens the account details screen Then "Add money with Pix" shows with the PIX Copia e Cola and PIX key rows Scenario: US user sees bank transfer details Given ramps-controller exposes getDepositInstructions And the wallet has an Approved USD autoramp with an ACH rail When user opens the account details screen Then "Add money by bank transfer" shows And account holder, routing number, account number, and bank name rows show And tapping a copy button copies that value ``` ## **Screenshots/Recordings** ### **Before** N/A: only the PIX layout existed. ### **After** N/A: a US autoramp needs the ramps-controller bump to render on device. The layout follows the Figma US details frame without the account type row. ## **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) - [ ] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [ ] 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 - [ ] 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/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. [TRAM-4130]: https://consensyssoftware.atlassian.net/browse/TRAM-4130?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes how deposit instructions are fetched and displayed for Money accounts, including copyable bank account numbers; incorrect data or API mismatch could mislead users funding their account. > > **Overview** > Extends the Money **VBA details** screen so it renders deposit instructions for **either PIX or US bank transfer**, based on what `NeoBankService` returns for the autoramp. > > The screen now loads details via **`getDepositInstructions`**, with a **fallback to `getPixDepositInstructions`** for older ramps-controller builds. A shared **`buildDetailRows`** path drives copyable rows (PIX Copia e Cola / key vs account holder, routing number, account number, bank name). **Title, description, hero image**, and **loading accessibility copy** switch between PIX and bank-transfer variants; generic strings replace PIX-only wording. > > Tests cover US rows, PIX via the unified reader, routing copy, and skeleton behavior when no rail is ready yet. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e182a69. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Explanation
Mobile is moving the virtual bank account flow beyond Brazil. Autoramps can already be created for any fiat code (
buildMusdAutorampRequest), butNeoBankServicecan only read PIX deposit details, so a US customer has no way to see the account they should send dollars to.This PR adds a reader for the US rails MoonPay returns in
deposit_rails:extractUsBankDepositInstructionsreads anACH,Wire,RTP, orFedNowrail. All four share the same fields (recipient_name,routing_number,account_number,bank_name, plus optionalbank_addressandrecipient_address). ACH is preferred when more than one is listed. Rails missing a required field are skipped.NeoBankService.getDepositInstructions(autorampId)returns whichever rail the autoramp has, discriminated bytype(PixorUsBank), or null. It is exposed on the messenger.getPixDepositInstructionsis unchanged.mapNeoBankAutorampToRemoteSnapshotnow fillsdepositRailsSummary.currencyfrom the rail type (Pixto BRL, US rails to USD,SEPAto EUR). The field already existed on the type but was never set.The new code is additive, so nothing breaks.
References
Checklist
Note
Medium Risk
Changes deposit-rail parsing and persisted autoramp currency metadata used for VBA UI; mistakes could show wrong fiat labels or bank details, though behavior is additive and covered by new tests.
Overview
Extends neo-bank autoramp support so US virtual-bank customers can see where to send fiat, not only PIX.
NeoBankService adds
getDepositInstructions(messenger action) andextractUsBankDepositInstructions, with typesUsBankDepositInstructions,UsBankDepositRail, andAutorampDepositInstructions. The unified API returns PIX (type: 'Pix') or US bank details (type: 'UsBank'for ACH, Wire, RTP, FedNow), preferring ACH when several US rails exist.getPixDepositInstructionsis unchanged.Snapshot mapping fills
depositRailsSummary.currencyfrom the first complete rail (BRL / USD / EUR for SEPA). Incomplete PIX stubs—including emptyinstruction—no longer count as complete, so they cannot mislabel currency or mask a US rail.Local state uses
mergeDepositRailsSummaryinapplyAutorampRemoteStatusto keep a storedcurrencywhen a later remote snapshot omits it, while still accepting an explicit remote update.Reviewed by Cursor Bugbot for commit 0534603. Bugbot is set up for automated code reviews on this repo. Configure here.