Skip to content

fix(ui): use new AssetLogo widget in place of CoinIcon and CoinLogo #2848

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

Merged
merged 13 commits into from
Jul 7, 2025

Conversation

takenagain
Copy link
Collaborator

@takenagain takenagain commented Jul 1, 2025

Summary

Closes #2626 , Closes #2627

  • Replaces CoinLogo and CoinIcon with AssetLogo and AssetIcon from the SDK.
  • Adds AssetLogo, which includes the network overlay icons

Expected behaviour

From #2626

  • When not an IBC token, there should be no overlay icon on Tendermint assets.
  • When it is an IBC icon, the overlay icon should be for the parent coin it is on.
  • Replace IRIS filter with Tendermint filter (to cover both native coins and IBC assets)
  • ATOM-IRIS_IBC activates without errors (Unable to activate IBC assets #2573)
  • Network overlays are displayed on wallet page icons (This issue affects AVX/
    BNB /ERC tokens too)

From #2627

  • Network overlay icons should be applied consistently across the app.
  • All deprecated CoinIcon instances must be updated to use AssetIcon
  • AssetIcon needs to be updated to include icon overlays

@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 14:56
Copy link
Contributor

coderabbitai bot commented Jul 1, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@Copilot 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 aligns asset logo usage with the updated SDK by pointing dependencies to the new branch and replacing legacy AssetIcon/CoinLogo calls with AssetLogo.fromTicker and AssetLogo.fromId, and removes the old coin_logo.dart.

  • Bump SDK git refs in pubspec.yaml and UI kit pubspec to codex/update-assetlogo-with-fromticker-and-fromid-methods
  • Replace AssetIcon and CoinLogo with AssetLogo.fromTicker/fromId across views and widgets
  • Remove legacy coin_logo.dart file

Reviewed Changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pubspec.yaml Updated SDK dependency refs to the new branch
packages/komodo_ui_kit/pubspec.yaml Updated SDK dependency refs to the new branch
lib/shared/widgets/coin_item/coin_logo.dart Removed legacy coin logo implementation
lib/views/wallet/wallet_page/common/grouped_asset_ticker_item.dart Swapped AssetIcon.ofTicker for AssetLogo.fromTicker
lib/views/wallet/coin_details/withdraw_form/withdraw_form.dart Swapped AssetIcon for AssetLogo.fromId
lib/views/wallet/coin_details/coin_details_info/charts/portfolio_profit_loss_chart.dart Swapped AssetIcon for AssetLogo.fromId
lib/views/market_maker_bot/coin_selection_and_amount_input.dart Updated import and swapped CoinLogo for AssetLogo.fromId
lib/views/dex/simple/form/taker/coin_item/coin_group.dart Updated import and swapped CoinLogo for AssetLogo.fromId
lib/views/custom_token_import/custom_token_import_dialog.dart Swapped AssetIcon.ofTicker for AssetLogo.fromTicker
lib/shared/widgets/coin_select_item_widget.dart Swapped AssetIcon.ofTicker for AssetLogo.fromTicker
lib/shared/widgets/coin_item/coin_item.dart Swapped CoinLogo for AssetLogo.fromId
lib/shared/widgets/asset_item/asset_item.dart Swapped AssetIcon for AssetLogo.fromId
Comments suppressed due to low confidence (6)

lib/views/wallet/wallet_page/common/grouped_asset_ticker_item.dart:261

  • Missing import for AssetLogo; please add import 'package:komodo_ui/komodo_ui.dart'; at the top of this file to resolve the symbol.
                AssetLogo.fromTicker(

lib/views/wallet/coin_details/withdraw_form/withdraw_form.dart:610

  • Missing import for AssetLogo; please add import 'package:komodo_ui/komodo_ui.dart'; to ensure AssetLogo is available.
            AssetLogo.fromId(asset.id),

lib/views/wallet/coin_details/coin_details_info/charts/portfolio_profit_loss_chart.dart:101

  • Missing import for AssetLogo; please add import 'package:komodo_ui/komodo_ui.dart'; so the widget compiles.
                      : AssetLogo.fromId(

lib/views/custom_token_import/custom_token_import_dialog.dart:303

  • Missing import for AssetLogo; please add import 'package:komodo_ui/komodo_ui.dart'; to this file.
                          AssetLogo.fromTicker(

lib/shared/widgets/coin_select_item_widget.dart:76

  • Missing import for AssetLogo; please add import 'package:komodo_ui/komodo_ui.dart'; to resolve the widget.
              child: AssetLogo.fromTicker(coinId),

lib/shared/widgets/asset_item/asset_item.dart:30

  • Missing import for AssetLogo; please add import 'package:komodo_ui/komodo_ui.dart'; to ensure compilation.
        AssetLogo.fromId(

@takenagain takenagain self-assigned this Jul 1, 2025
@takenagain takenagain marked this pull request as draft July 1, 2025 14:58
@takenagain takenagain changed the title Update asset logo references fix(ui): use new AssetLogo widget in place of CoinIcon and CoinLogo Jul 1, 2025
@takenagain takenagain added the bug Something isn't working label Jul 1, 2025
Copy link

github-actions bot commented Jul 1, 2025

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

https://walletrc--pull-2848-merge-363x3g0r.web.app

(expires Sun, 13 Jul 2025 09:47:15 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@takenagain takenagain added this to the v0.9.2 Release milestone Jul 1, 2025
taker and maker forms previously relied on the CoinLogo placeholder widget when the coin was null in the form
- remove coin_icon
- update references to AssetIcon
- update imports
- update precaching in app_bloc_root
@takenagain takenagain force-pushed the codex/update-logo-references-to-assetlogo branch from fabe731 to 06c43d4 Compare July 2, 2025 15:39
@takenagain takenagain marked this pull request as ready for review July 3, 2025 19:18
@takenagain takenagain added the QA Ready for QA Testing label Jul 3, 2025
@takenagain takenagain requested review from smk762 and CharlVS July 3, 2025 19:18
@smk762
Copy link
Collaborator

smk762 commented Jul 4, 2025

Thanks, I've been looking forward to this one!

In the coin activation page, can we communicate the IBC parent in text somehow also?
image

If no space its ok, they are shown in portfolio and wallet page, and icon is indicative so its just a little extra for the uninitiated.
image

In dex veiw, the collapsed form shouldn't have an overlay it's misleading and leads to duplicated graphic on expansion.
image
image

In private keys view, Tendermint section looks a bit weird. Only parent/native coins should be shown, not tokens, and by extension, no overlay.
image

@smk762
Copy link
Collaborator

smk762 commented Jul 5, 2025

Thanks!
Confirmed dex expand headers are good. ✔️
Confirmed privkey list is good ✔️

One last tweak: tendermint / tendermint token filter seems to be inverted.

image
image

Copy link
Member

@CharlVS CharlVS left a comment

Choose a reason for hiding this comment

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

Please take care of SDK #121 for refactoring before the following release.

Copy link
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for this update!

@CharlVS CharlVS merged commit dacd317 into dev Jul 7, 2025
10 of 14 checks passed
@CharlVS CharlVS deleted the codex/update-logo-references-to-assetlogo branch July 7, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working codex QA Ready for QA Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixed use of CoinIcon and AssetIcon results in inconsistent styling Tendermint network icon incorrectly defaults to IRIS
3 participants