Skip to content

sync main#293

Merged
ca333 merged 4 commits intomainfrom
dev
Nov 13, 2025
Merged

sync main#293
ca333 merged 4 commits intomainfrom
dev

Conversation

@ca333
Copy link
Copy Markdown
Contributor

@ca333 ca333 commented Nov 13, 2025

fix BASE

Summary by CodeRabbit

  • New Features
    • Asset logos now display protocol overlays for additional parent assets, providing clearer visual identification of protocol associations across supported networks.

Copilot AI review requested due to automatic review settings November 13, 2025 11:28
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Single file modification expanding protocol overlay logic in asset logo display. Introduces overlay support for specific parent assets (ETH-BASE, ETH-ARB20) alongside child assets, changing protocolTicker source from parent asset id to resolvedId.subClass.iconTicker.

Changes

Cohort / File(s) Summary
Asset Logo Protocol Overlay Enhancement
packages/komodo_ui/lib/src/defi/asset/asset_logo.dart
Expands protocol overlay logic to support designated parent assets (ETH-BASE, ETH-ARB20) in addition to child assets; changes protocolTicker resolution to use resolvedId.subClass.iconTicker; updates shouldShowProtocolIcon condition to account for both child and overlay-parent assets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify that the new isParentWithOverlay condition correctly identifies ETH-BASE and ETH-ARB20 assets
  • Confirm that protocolTicker resolution from resolvedId.subClass.iconTicker works correctly for both child and parent overlay assets
  • Test visual rendering to ensure overlays display as intended for the targeted assets

Possibly related PRs

  • #109: Modifies the same file and changes protocol-overlay logic for child/parent assets to determine which ticker is used for rendering protocol icons.
  • #257: Adds CoinSubClass.base and iconTicker/ticker handling that this PR's new protocolTicker resolution depends on.

Suggested labels

codex

Suggested reviewers

  • CharlVS

Poem

🐰 ✨

Protocol overlays bloom in layers bright,
ETH-BASE and ARB20 dance in sight,
Child assets now with icons wear their crown,
The subClass ticker brings the logic down! 🎭

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c1f9aa and e277b31.

📒 Files selected for processing (1)
  • packages/komodo_ui/lib/src/defi/asset/asset_logo.dart (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ca333 ca333 merged commit 8fcf207 into main Nov 13, 2025
7 of 9 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the asset logo display logic to fix an issue with BASE network assets. The change modifies how protocol overlay icons are determined for both child assets (tokens) and specific parent EVM chain assets.

Key Changes

  • Added logic to display protocol overlays for specific parent assets (ETH-BASE and ETH-ARB20) in addition to child assets
  • Changed from using parentId?.id to subClass.iconTicker for determining the protocol icon to display
  • Updated comments to clarify the purpose of the protocol icon overlay

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

final bool isParentWithOverlay =
resolvedId != null &&
!isChildAsset &&
(resolvedId.id == 'ETH-BASE' || resolvedId.id == 'ETH-ARB20');
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

The hardcoded asset IDs 'ETH-BASE' and 'ETH-ARB20' create a maintainability issue. If more parent EVM chain assets (like ETH-MATIC, ETH-AVX20, etc.) need similar overlay treatment, they would need to be added individually to this condition.

Consider a more scalable approach such as:

  1. Using a property/flag on the AssetId or CoinSubClass to indicate if a parent asset should display a protocol overlay
  2. Checking if the asset is a parent EVM chain asset (using evmCoinSubClasses.contains(resolvedId.subClass))
  3. Creating a set of subclasses that should display overlays when they are parent assets

Example:

final isParentWithOverlay = resolvedId != null &&
    !isChildAsset &&
    evmCoinSubClasses.contains(resolvedId.subClass) &&
    resolvedId.id.startsWith('ETH-');

This would automatically handle any ETH-prefixed parent asset on EVM-compatible chains without requiring individual hardcoding.

Suggested change
(resolvedId.id == 'ETH-BASE' || resolvedId.id == 'ETH-ARB20');
evmCoinSubClasses.contains(resolvedId.subClass) &&
resolvedId.id.startsWith('ETH-');

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

Visit the preview URL for this PR (updated for commit e277b31):

https://kdf-sdk--pr293-dev-0j7tzh9y.web.app

(expires Thu, 20 Nov 2025 11:34:16 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 9c1b6e6c010cf0b965c455ba7a69c4aedafa8a1d

@github-actions
Copy link
Copy Markdown
Contributor

Visit the preview URL for this PR (updated for commit e277b31):

https://komodo-playground--pr293-dev-8grb3acr.web.app

(expires Thu, 20 Nov 2025 11:34:31 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2bfedd77fdea45b25ba7c784416e81f177aa5c47

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants