Commit a1be275
feat(ramps-controller): dev-api URLs for Development (#8574)
## Explanation
`RampsEnvironment.Development` previously fell through the same branch
as staging and sent all traffic to the UAT hosts
(`on-ramp*.uat-api.cx.metamask.io`). This PR gives development its own
API hosts on the `dev-api` subdomain, aligned with production/staging
patterns.
Implementation details:
- **Orders (and other non-regions callers)** use
`https://on-ramp.dev-api.cx.metamask.io`.
- **Regions / cache-backed endpoints** use
`https://on-ramp-cache.dev-api.cx.metamask.io` via the same `${cache}`
suffix as other environments (so `getCountries` and related regions
traffic stay on the cache host).
Production, staging, and local base URLs are unchanged.
Draft Mobile PR: MetaMask/metamask-mobile#29526
## References
- PR branch: `feature/enable-dev-ramps`
- Follows the same `on-ramp${cache}.<env>-api.cx.metamask.io` shape as
production and staging.
## Testing
`yarn workspace @metamask/ramps-controller jest
packages/ramps-controller/src/RampsService.test.ts`
## 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 (not applicable — no breaking changes;
`Development` now targets dedicated dev hosts instead of UAT)
## Risk
Low for production/staging users. Consumers that instantiate
`RampsService` (or the controller) with `RampsEnvironment.Development`
will hit new hostnames; confirm dev-api is reachable and
feature-complete for your flows before relying on it.
---------
Co-authored-by: Amitabh Aggarwal <[email protected]>1 parent 5a9127d commit a1be275
3 files changed
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
427 | | - | |
| 426 | + | |
| 427 | + | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
| 713 | + | |
| 714 | + | |
714 | 715 | | |
715 | 716 | | |
716 | 717 | | |
| |||
720 | 721 | | |
721 | 722 | | |
722 | 723 | | |
723 | | - | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
724 | 729 | | |
725 | 730 | | |
726 | 731 | | |
727 | 732 | | |
728 | 733 | | |
729 | | - | |
730 | 734 | | |
| 735 | + | |
| 736 | + | |
731 | 737 | | |
732 | 738 | | |
733 | 739 | | |
| |||
0 commit comments