Skip to content

Conversation

@memoyil
Copy link
Collaborator

@memoyil memoyil commented Nov 7, 2025

This pr make token components having the same srcs


PR-Codex overview

This PR focuses on refactoring the token logo retrieval process across the application, replacing the getImageUrlFromToken function with getCurrencyLogoSrcs, and updating various components to use this new method for improved consistency and efficiency.

Detailed summary

  • Replaced getImageUrlFromToken with getCurrencyLogoSrcs in multiple files.
  • Updated safeGetAddress to safeGetUnifiedAddress in getTokenLogoURL.ts.
  • Modified logo image handling in CurrencyLogo, TokenPairImage, and TokenImage components.
  • Adjusted memoization logic in getCurrencyLogoSrcs.
  • Cleaned up unused imports and functions related to token image handling.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
web Ready Ready Preview Comment Nov 20, 2025 0:53am
8 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
aptos-web Ignored Ignored Nov 20, 2025 0:53am
blog Ignored Ignored Nov 20, 2025 0:53am
bridge Ignored Ignored Nov 20, 2025 0:53am
games Ignored Ignored Nov 20, 2025 0:53am
gamification Ignored Ignored Nov 20, 2025 0:53am
solana Ignored Ignored Nov 20, 2025 0:53am
ton Ignored Ignored Nov 20, 2025 0:53am
uikit Ignored Ignored Nov 20, 2025 0:53am

@changeset-bot
Copy link

changeset-bot bot commented Nov 7, 2025

⚠️ No Changeset found

Latest commit: d3d4c1e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@memoyil memoyil force-pushed the feature/fix_use_enriched_solana_token branch 5 times, most recently from f74c021 to 356b6c8 Compare November 7, 2025 10:51
@memoyil memoyil force-pushed the feature/fix_use_enriched_solana_token branch from 356b6c8 to c328f24 Compare November 7, 2025 11:48
@pull-request-size pull-request-size bot added size/M and removed size/L labels Nov 7, 2025
@memoyil memoyil force-pushed the feature/fix_use_enriched_solana_token branch from c328f24 to 7c424e7 Compare November 7, 2025 11:54
@pull-request-size pull-request-size bot added size/S and removed size/M labels Nov 7, 2025
@memoyil memoyil closed this Nov 7, 2025
@memoyil memoyil force-pushed the feature/fix_use_enriched_solana_token branch from 7c424e7 to abdc983 Compare November 7, 2025 12:46
@pull-request-size pull-request-size bot added size/XS and removed size/S labels Nov 7, 2025
@memoyil memoyil reopened this Nov 7, 2025
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Nov 7, 2025
@memoyil memoyil closed this Nov 7, 2025
@memoyil memoyil force-pushed the feature/fix_use_enriched_solana_token branch from e4eba64 to abdc983 Compare November 7, 2025 13:11
@pull-request-size pull-request-size bot added size/XS and removed size/M labels Nov 7, 2025
@memoyil memoyil reopened this Nov 7, 2025
@pull-request-size pull-request-size bot added size/M and removed size/XS labels Nov 7, 2025
@memoyil memoyil changed the title fix: Use enriched solana token fix: Use enriched solana token for image srcs Nov 7, 2025
@pull-request-size pull-request-size bot added size/L and removed size/M labels Nov 8, 2025
@memoyil memoyil force-pushed the feature/fix_use_enriched_solana_token branch from 9c4136f to 4aefe12 Compare November 8, 2025 06:52
@memoyil memoyil force-pushed the feature/fix_use_enriched_solana_token branch from 9f30a70 to c34ea03 Compare November 8, 2025 07:26
<UIKitTokenPairImage
primarySrc={getImageUrlFromToken(primaryToken)}
secondarySrc={getImageUrlFromToken(secondaryToken)}
primarySrc={getCurrencyLogoSrcs(primaryToken)[0]}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

getCurrencyLogoSrcs always returns an array so it is safe to check with index directly

const tokenLogoURL = getTokenLogoURL(currency as Token)
if (!tokenLogoURL) return [...imageUrls, ...uriLocations, basicTokenImage]
return [...imageUrls, ...uriLocations, tokenLogoURL, basicTokenImage]
return [...uriLocations, imageUri, tokenLogoURL, basicTokenImage]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

imageUrls inside has uriLocations precedence thats why the order changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants