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

feat: Gracefully fetch external json #1685

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexV525
Copy link

@AlexV525 AlexV525 commented Feb 5, 2025

Changes

The uri field could be empty for some of the tokens, for example, USDC (6GpMXZmS7bBHBc9TrVRFUaerSQXYJPkpq31aET3UWd4R).

{
  "name": "USD Coin",
  "symbol": "USDC",
  "uri": "",
  "updateAuthority": "2wmVCSfPxGPjrnMMn7rchp4uaeoTqN39mXFC2zhPdri9",
  "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}

The change will make sure to request a valid URI or return the null result rather than throws.

Checklist

  • PR is ready for review (if not, it should be a draft).
  • PR title follows Conventional Commits guidelines.
  • Screenshots/video added.
  • Tests added.
  • Self-review done.

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.

1 participant