-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix: Use enriched solana token for image srcs #12508
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
base: develop
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
8 Skipped Deployments
|
|
f74c021 to
356b6c8
Compare
356b6c8 to
c328f24
Compare
c328f24 to
7c424e7
Compare
7c424e7 to
abdc983
Compare
e4eba64 to
abdc983
Compare
9c4136f to
4aefe12
Compare
9f30a70 to
c34ea03
Compare
| <UIKitTokenPairImage | ||
| primarySrc={getImageUrlFromToken(primaryToken)} | ||
| secondarySrc={getImageUrlFromToken(secondaryToken)} | ||
| primarySrc={getCurrencyLogoSrcs(primaryToken)[0]} |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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
c34ea03 to
0fc8262
Compare
4aefe12 to
55a360a
Compare
55a360a to
9bc9f7c
Compare
9bc9f7c to
d3d4c1e
Compare
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
getImageUrlFromTokenfunction withgetCurrencyLogoSrcs, and updating various components to use this new method for improved consistency and efficiency.Detailed summary
getImageUrlFromTokenwithgetCurrencyLogoSrcsin multiple files.safeGetAddresstosafeGetUnifiedAddressingetTokenLogoURL.ts.CurrencyLogo,TokenPairImage, andTokenImagecomponents.getCurrencyLogoSrcs.