Skip to content

fix(geolocation-controller): point to API Platform geolocation-api instead of legacy Ramps endpoint#9417

Merged
amitabh94 merged 5 commits into
mainfrom
fix/geolocation-controller-repoint-api-platform-endpoint
Jul 7, 2026
Merged

fix(geolocation-controller): point to API Platform geolocation-api instead of legacy Ramps endpoint#9417
amitabh94 merged 5 commits into
mainfrom
fix/geolocation-controller-repoint-api-platform-endpoint

Conversation

@amitabh94

@amitabh94 amitabh94 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Explanation

GeolocationApiService (used by Ramp, Perps, Rewards, Card, mUSD, and Money Account across extension and mobile) still fetches from the legacy Ramps-owned on-ramp.{env}api.cx.metamask.io/geolocation endpoint.

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.io does not resolve, and the UAT workload config in va-mmcx-geolocation-api-workload is empty). This PR temporarily maps Env.UAT to 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:

  • the PROD/DEV URLs are correct and stable
  • the UAT-points-at-PROD interim approach is acceptable on their end

References

Supersedes #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
GeolocationApiService now calls API Platform’s geolocation-api host and /v1/geolocation path instead of the legacy Ramps on-ramp.* /geolocation URLs that are being deprecated. The response contract is unchanged (plain-text ISO 3166-2).

getGeolocationUrl builds https://geolocation.api.cx.metamask.io for production and UAT, and https://geolocation.dev-api.cx.metamask.io for DEV. UAT no longer uses a separate uat- 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.

amitabh94 added 2 commits July 7, 2026 12:42
…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.
@amitabh94 amitabh94 enabled auto-merge July 7, 2026 18:40

@Cal-L Cal-L left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amitabh94 amitabh94 added this pull request to the merge queue Jul 7, 2026
Merged via the queue into main with commit 6886442 Jul 7, 2026
417 checks passed
@amitabh94 amitabh94 deleted the fix/geolocation-controller-repoint-api-platform-endpoint branch July 7, 2026 20:12
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