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

Simplify fetching of chain metadata including logos #554

Open
jmrossy opened this issue Feb 5, 2025 · 1 comment
Open

Simplify fetching of chain metadata including logos #554

jmrossy opened this issue Feb 5, 2025 · 1 comment

Comments

@jmrossy
Copy link
Collaborator

jmrossy commented Feb 5, 2025

Chain metadata doesn't necessarily include a logoURI, but we do require a logo.svg for chain entries in the registry. So it's possible to get all the chain info including all the logos but atm it looks like this code in the explorer:

  // Ensure that by the before this code is done, the registry classes content caches will be filled
  await registry.listRegistryContent();
  // Get the chain metadata, most of which don't have logos yet
  const registryChainMetadata = await registry.getMetadata();
  // Merge the registry-based logo URIs into the metadata
  const metadataWithLogos = await promiseObjAll(
    objMap(
      registryChainMetadata,
      async (chainName, metadata): Promise<ChainMetadata> => ({
        ...metadata,
        logoURI: (await registry.getChainLogoUri(chainName)) || undefined,
      }),
    ),
  );

We should improve the interface so that logos 'just work'.

It may make sense to do this at the same time as #534

@jmrossy
Copy link
Collaborator Author

jmrossy commented Feb 5, 2025

Once this is done, we can clean up TODOs in the explorer, warp ui, and deploy app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant