Repository navigation
feat(ramps-controller): migrate NeoBankService to BaseDataService - #10882
Conversation
f52b860 to
2e2eed4
Compare
|
@metamaskbot publish-preview |
|
Can we please trigger a RC mobile build based on this PR since this is high risk change and we are very close to launching to users? Would be great if you can add the video of the VBA feature or reach out to someone from the money movement team to help test this? |
Yes in progress thats why I have generated the preview build above your comment will keep you posted. |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
…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>
Explanation
Moves
NeoBankServiceontoBaseDataService; reads and writes now share one circuit breaker.Reads always refetch (
staleTimeof 0), and only concurrent identical calls share one request.References
Checklist
Note
High Risk
Breaking API and resilience behavior (removed policy hooks, unified circuit breaker that can block writes after read failures, new error strings) affects all NeoBank ramp flows and hosts that wired messengers or error handling to the old service.
Overview
NeoBankService is rebuilt on
BaseDataService, so reads and writes share one circuit breaker and retry policy instead of separate read vs no-retry POST policies. Hosts gain messengerNeoBankService:invalidateQueriesandcacheUpdated/ granular cache events;onRetry,onBreak, andonDegradedare removed.Neo-bank GETs and idempotent-style reads go through
fetchQuerywithstaleTime/gcTimeof 0 (every sequential call hits the API) while concurrent identical calls are deduplicated;getAutorampspaginates with one query key per cursor page. POST-style methods useexecuteMutationwithout automatic retries on 5xx. Responses are validated with@metamask/superstructstructs, and malformed bodies now throwQuery function for "NeoBankService:…"/Mutation function for "NeoBankService:createAutoramp"errors instead of the old neo-bank malformed messages. Several quote/customer helpers now returnPromise<Json>instead ofPromise<unknown>.Package adds
@metamask/base-data-serviceand@metamask/superstruct, exports the new messenger types, and expands tests for deduplication, cache events, and mutation/query behavior.Reviewed by Cursor Bugbot for commit 0e1860a. Bugbot is set up for automated code reviews on this repo. Configure here.