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

Assets not sorted by fiat balance on "assets to pay" and "assets to receive" screens #21636

Open
VolodLytvynenko opened this issue Nov 18, 2024 · 2 comments · May be fixed by #21790
Open

Assets not sorted by fiat balance on "assets to pay" and "assets to receive" screens #21636

VolodLytvynenko opened this issue Nov 18, 2024 · 2 comments · May be fixed by #21790
Assignees
Milestone

Comments

@VolodLytvynenko
Copy link
Contributor

Steps:

  1. Go to swap
  2. Open "assets to pay" screen
  3. Open "assets to receive" screen

Actual result:

Assets not sorted by fiat available balance in descending order

Image

Expected result:

Assets should be sorted by fiat available balance in descending order on "assets to pay" and "assets to receive" screens
https://www.figma.com/design/AD2JSKg0I8dZcylyiGa62O/Swap-for-Mobile?node-id=43-170626&node-type=frame&t=M5nVcC6Sxn3Nuue6-0

OS:

IOS, Android

Devices:

  • Pixel 7a, Android 13
  • iPhone 11 Pro Max, IOS 17

ENV:

Nightly 18 Nov, 2024

@alwx
Copy link
Contributor

alwx commented Nov 21, 2024

@VolodLytvynenko

Currently we explicitly specify the priority of tokens the following way:

{"SNT" 1 "STT" 1 "ETH" 2 "DAI" 3}

It means those four tokens will always be on top, no matter the balance. The rest will be sorted based on balance.
Do you want me to change that?

@VolodLytvynenko VolodLytvynenko removed this from the 2.32.0 milestone Nov 22, 2024
@VolodLytvynenko
Copy link
Contributor Author

Hi, yes, it would be better to fix it. However, the priority of this issue is minor, so I’ve removed it from 2.32.

Here are some reasons why this behavior should work as it is:

  1. This is clearly aligned with the design. Even if SNT is grouped with some other assets, it’s displayed lower than others, and this approach is similar to other apps like Paraswap, which we use as a provider for swapping.

  2. On the wallet main page, the sorting logic is based on fiat balance in descending order (screen)
    Image
    and SNT, DAI, and ETH follow this sorting as well. For consistency, it would be better to maintain the same approach across all screens. Currently, SNT, DAI, and ETH are prioritized on some pages, while on the wallet main page, sorting is based on fiat balance in descending order, which is inconsistent.

  3. In fact, SNT, ETH, and DAI are not exceptions. Sometimes, other assets are also not shown in descending order. Therefore, this feature might need to be re-implemented to ensure consistency.
    Image

  4. Such behavior will align with the desktop Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
4 participants
@alwx @churik @VolodLytvynenko and others