fix(geolocation-controller): point to API Platform geolocation-api instead of legacy Ramps endpoint#9417
Merged
amitabh94 merged 5 commits intoJul 7, 2026
Conversation
…stead of legacy Ramps on-ramp endpoint
GeolocationApiService still called the Ramps-owned
on-ramp.{env}api.cx.metamask.io/geolocation endpoint, which is slated for
deprecation now that geolocation is a platform-owned service. Repoint at
geolocation.{env}api.cx.metamask.io/v1/geolocation instead. Same response
contract (plain-text ISO 3166-2 code), so no consumer-facing changes needed.
UAT temporarily resolves to the production URL since API Platform has not
yet provisioned a dedicated UAT deployment for this service.
mcmire
reviewed
Jul 7, 2026
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
GeolocationApiService(used by Ramp, Perps, Rewards, Card, mUSD, and Money Account across extension and mobile) still fetches from the legacy Ramps-ownedon-ramp.{env}api.cx.metamask.io/geolocationendpoint.That endpoint is slated for deprecation now that geolocation is a platform-owned service. API Platform's replacement,
geolocation.{env}api.cx.metamask.io/v1/geolocation, has been live since March and returns the same plain-text ISO 3166-2 response format, so this is a same-contract URL swap with no consumer-facing changes.Open item before merge
API Platform has not yet provisioned a dedicated UAT deployment for
geolocation-api(confirmed:geolocation.uat-api.cx.metamask.iodoes not resolve, and the UAT workload config inva-mmcx-geolocation-api-workloadis empty). This PR temporarily mapsEnv.UATto the production URL so UAT testing isn't broken by this change. That mapping should be revisited once a real UAT deployment exists.Opening as draft pending confirmation from API Platform (
@api-platform-devs) that:References
packages/geolocation-controlleris owned by@metamask-mobile-platformper CODEOWNERSSupersedes #9415 (opened from a fork by mistake, which broke the changelog-diff CI check).
Note
Medium Risk
Wide downstream use (Ramp, Perps, Rewards, etc.) makes any geolocation outage impactful, though the API contract is unchanged; UAT hitting production is an interim operational caveat.
Overview
GeolocationApiServicenow calls API Platform’sgeolocation-apihost and/v1/geolocationpath instead of the legacy Rampson-ramp.*/geolocationURLs that are being deprecated. The response contract is unchanged (plain-text ISO 3166-2).getGeolocationUrlbuildshttps://geolocation.api.cx.metamask.iofor production and UAT, andhttps://geolocation.dev-api.cx.metamask.iofor DEV. UAT no longer uses a separateuat-host and temporarily shares the production URL until API Platform provisions a UAT deployment. Tests and the changelog reflect the new URLs and UAT behavior.Reviewed by Cursor Bugbot for commit 411259b. Bugbot is set up for automated code reviews on this repo. Configure here.