Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Migrate API usage from *.metafi & *.metaswap subdomains to *.cx.metamask.io" #4301

Merged
merged 3 commits into from
May 23, 2024

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented May 21, 2024

Explanation

API Platform team intends to deprecate *.metafi and *.metaswap subdomains in favour of *.api.cx.metamask.io
The new *.api.cx.metamask.io is already in place.
The old *.metafi and *.metaswap are still used across the controllers.
Controllers do not break currently because redirects are in place for the older sub-domains.
The redirects will be removed once all clients (Extension, Mobile, Core) are migrated.

References

Changelog

@metamask/assets-controller

  • CHANGED: Update price API endpoint from price-api.metafi.codefi.network to price.api.cx.metamask.io
  • CHANGED: Update token icons API endpoint from *.metafi.codefi.network to *.cx.metamask.io
  • CHANGED: Update toke API endpoint from token-api.metaswap.codefi.network to token.api.cx.metamask.io

@metamask/phishing-controller

  • CHANGED: Update phishing detection API endpoint from *.metafi.codefi.network to *.api.cx.metamask.io

@metamask/controller-utils

  • CHANGED: Update OpenSea proxy endpoint from *.metafi.codefi.network to *.api.cx.metamask.io

@metamask/name-controller

  • CHANGED: Update token API endpoint from token-api.metaswap.codefi.network to token.api.cx.metamask.io

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 highlighted breaking changes using the "BREAKING" category above as appropriate

Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

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

Looks good! Just a small question

Copy link
Contributor

@kanthesha kanthesha left a comment

Choose a reason for hiding this comment

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

LGTM.

@mikesposito
Copy link
Member

mikesposito commented May 22, 2024

These changes should be transparent for external consumers, since the old endpoints should be functionally equivalent to the new ones - so I don't think we should mark them as breaking.

Or do you expect something to break?

@cryptodev-2s
Copy link
Contributor Author

cryptodev-2s commented May 22, 2024

These changes should be transparent for external consumers, since the old endpoints should be functionally equivalent to the new ones - so I don't think we should mark them as breaking.

Or do you expect something to break?

Yes I agree in somehow this should not be tagged as breaking change but in similar change this was marked as BREAKING PR

@mcmire
Copy link
Contributor

mcmire commented May 22, 2024

@cryptodev-2s Hmm, I am not sure why they marked the changes as breaking in that PR. That seems like a mistake to me. I had the same understanding as @mikesposito, that the new URL is simply an alias for the old one. I also agree that we should not mark these as breaking.

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

I've cross-referenced these URL changes via Slack and they look correct to me.

@cryptodev-2s cryptodev-2s merged commit d5e007b into main May 23, 2024
147 checks passed
@cryptodev-2s cryptodev-2s deleted the fix/replace-metafi-metaswap-subdomains branch May 23, 2024 09:56
@legobeat legobeat changed the title fix: Migrate API usage from *.metafi & *.metaswap subdomains to *.cx.metamsk.io" fix: Migrate API usage from *.metafi & *.metaswap subdomains to *.cx.metamask.io" May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Migrate API usage from *.metafi and *.metaswap subdomains to *.api.cx.metamask.io
4 participants