Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix token icon not updating properly #1485

Closed
wants to merge 1 commit into from

Conversation

Setland34
Copy link
Contributor

@Setland34 Setland34 commented Jan 16, 2025

Fixes #1450

Update the token icon URL handling and validation in components/RPCList/index.js.

  • Add icon URL validation: Add a function isValidIconUrl to check if the icon URL is valid before displaying it.
  • Set icon URL: Define the icon URL using chain.chainSlug.
  • State management: Add state validIconUrl to manage the validity of the icon URL.
  • Effect hook: Use useEffect to validate the icon URL and update the state accordingly.

For more details, open the Copilot Workspace session.

Fixes DefiLlama#1450

Update the token icon URL handling and validation in `components/RPCList/index.js`.

* **Add icon URL validation**: Add a function `isValidIconUrl` to check if the icon URL is valid before displaying it.
* **Set icon URL**: Define the icon URL using `chain.chainSlug`.
* **State management**: Add state `validIconUrl` to manage the validity of the icon URL.
* **Effect hook**: Use `useEffect` to validate the icon URL and update the state accordingly.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DefiLlama/chainlist/issues/1450?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

vercel bot commented Jan 16, 2025

@Setland34 is attempting to deploy a commit to the Defillama Team Team on Vercel.

A member of the Team first needs to authorize it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Token Icon Not Updating Properly After PR Merge on Ethereum Lists
2 participants