Repository navigation
fix(chains): map legacy testnet spec ids onto their chain's icon - #66
Merged
Merged
Conversation
The testnet explorer lists 20 specs whose ids have no alias, so they fall back to a lowercased file name that doesn't exist (cos5.svg, polygon1.svg, ...) and show a letter placeholder. 18 of them are old ids of chains we already have icons for, and now map to those icons. The two Cosmos SDK base specs have no chain icon and keep the placeholder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#Closes MAG-4940
Jira ticket: MAG-4940
Summary
ALIASES(packages/shared/src/utils/chain-icons.ts). They fall back to a lowercased file name that doesn't exist, such ascos5.svgorpolygon1.svg, so they show a letter placeholder.ARB1,ARBS→arbitrum-one;ARBN→arbitrum-novaBASET→baseCOS3,COS4,OSMO,OSMOT→osmosisCOS5,COS5T,COSHUB,COSHUBT→cosmos-hubGTH1→ethereumHEDERATest→hederaOPTMT→optimismPOLYGON1,POLYGON1T→polygonSTRKT→starknetCOSMOSSDK45DEPandCOSMOSSDKFULLare base specs with no chain icon, so they keep the placeholder.apps/web/public/chains/, and those files match the docs repo's chain icons. Mainnet has no gaps.Screenshots
/chainson the testnet explorer, filtered to the 20 affected rows. Both builds use the live testnet API.Before (
main): every one shows a letter placeholder.After (this branch): 18 show their chain's icon. The two Cosmos SDK base specs keep the placeholder.
Test plan
pnpm test: shared 44, web 19, api 134, all pass. This includes a new case inchain-icons.test.ts.pnpm typecheck: passes.NEXT_PUBLIC_API_URL=https://api-testnet-info.lavanet.xyz,NEXT_PUBLIC_NETWORK=testnet), frommainand from this branch. Opened/chainsin both. The screenshots show the same 20 rows from each.