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

Add ibc source badge to asset icons #1864

Open
grod220 opened this issue Oct 17, 2024 · 2 comments
Open

Add ibc source badge to asset icons #1864

grod220 opened this issue Oct 17, 2024 · 2 comments
Labels
ui Related to user interface or ux design

Comments

@grod220
Copy link
Collaborator

grod220 commented Oct 17, 2024

At the moment, minifront indiscriminately displays the asset icon provided by the prax asset registry in the ValueViewComponent. Example:
Screenshot 2024-10-17 at 7 20 56 PM

The challenge is that this can mislead users. For example, Penumbra can connect to multiple Cosmos chains that each may have a Bitcoin variation using the same Bitcoin icon. For users, it would be impossible to distinguish them in the UI. There should be a way for frontends to be able to label assets depending on the channel source, so it's clear to users where it is coming from.

Task: Add a badges field to the Metadata proto that allows the registry to add the ibc chain icon to the asset's badge list.

Steps:

  1. Update the Metadata proto in penumbra-zone/penumbra to include a new badges field (type: ~Vec<Image>)
  2. Pull in latest proto defs to registry. Add the chain icon to the respective ibc asset's metadata. Regenerate registry and ship new version of registry npm package.
  3. Pull in latest proto defs to minifront. Update to latest registry package. Update ValueViewComponent to show badge on top of icon.
@grod220 grod220 added the ui Related to user interface or ux design label Oct 17, 2024
@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra web Oct 17, 2024
@grod220 grod220 moved this to 📝 Todo in Labs web Oct 17, 2024
@grod220 grod220 added this to Labs web Oct 17, 2024
@hdevalence
Copy link
Member

The rendering should be a circle 1/2 of the radius of the main icon (so 1/4 the area) and placed in the lower right quadrant, aligned with the edge of the icons:

Screenshot 2024-10-17 at 2 53 09 PM

@hdevalence
Copy link
Member

hdevalence commented Oct 17, 2024

xref prax-wallet/registry#97 for proposed policy -- this shouldn't apply to all assets, just bridged ones

@grod220 grod220 self-assigned this Oct 22, 2024
cronokirby pushed a commit to penumbra-zone/penumbra that referenced this issue Oct 23, 2024
## Describe your changes

Web apps are currently unable to visually distinguish certain IBC assets
that represent rehypothecated tokens. Aka, Bitcoin from Osmosis or
Nomic. Both of their metadata possess images of the plain Bitcoin logo.

This proto change proposes to add a new field: `badges`. It gives
entities like the [prax
registry](https://github.com/prax-wallet/registry) the ability to add
source chain icons to the metadata of assets. Frontends can then display
these badges [on top
of](penumbra-zone/web#1864 (comment))
the asset icon.

## Issue ticket number and link

penumbra-zone/web#1864
prax-wallet/registry#97

## Checklist before requesting a review

- [x] (not relevant) I have added guiding text to explain how a reviewer
should test these changes.

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

  > Only a protobuf schema update
@grod220 grod220 moved this from 🛑 Blocked to 📝 Todo in Labs web Dec 5, 2024
@grod220 grod220 removed their assignment Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui Related to user interface or ux design
Projects
Status: 🗄️ Backlog
Development

No branches or pull requests

2 participants