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

Don't display a 'Trade' button next to assets that are prohibited by Swap page #1568

Open
turbocrime opened this issue Jul 26, 2024 · 3 comments
Labels
bug Something isn't working ui Related to user interface or ux design

Comments

@turbocrime
Copy link
Contributor

turbocrime commented Jul 26, 2024

Describe the bug
A 'trade' button appears next to tokens that cannot be swapped

To Reproduce
Steps to reproduce the behavior:

  1. Delegate UM to a validator, optionally unbond some UM from a validator
  2. Navigate to Assets page
  3. Mouseover the token in your asset list
  4. Click the Trade button to view a swap form pre-filled with this asset
  5. See you have 0 of this asset available to swap

Expected behavior
The asset list should not invite the user to trade a token that is considered invalid by the swap page.

Screenshots

asset list

Screenshot 2024-07-26 at 12 53 38

swap page

Screenshot 2024-07-26 at 12 53 50

Additional context

I examined this problem on a local devnet

@turbocrime turbocrime added bug Something isn't working ui Related to user interface or ux design labels Jul 26, 2024
@plaidfinch
Copy link

Why does the swap page consider those assets invalid to trade? The protocol allows it, and indeed this is useful to permit, because it lets people exit delegation early if there is a counterparty willing to take on the slashing risk.

@turbocrime
Copy link
Contributor Author

turbocrime commented Jul 27, 2024

i agree that the correct action may be to simply not filter assets for swap input. i think filtering was implemented before the priority system existed, so the intent was to declutter the asset selection menu.

i think it may also make sense to not show delegation tokens in the normal asset list, but provide a trade button next to the appropriate validator on the stake page.

@plaidfinch
Copy link

I disagree with not showing delegation assets in the normal asset list. One of the key differentiators of Penumbra is that delegation tokens are ordinary tokens, with all that this entails. This fact, imo, should not be occluded by the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui Related to user interface or ux design
Projects
Status: 🗄️ Backlog
Development

No branches or pull requests

2 participants