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

Sort receive accounts in swap section #16265

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

enjojoy
Copy link
Contributor

@enjojoy enjojoy commented Jan 8, 2025

Description

Sort accounts by account type and account index

Related Issue

Resolve #14879

Screenshots:

Screenshot 2025-01-08 at 14 46 56 Screenshot 2025-01-08 at 14 59 52

@enjojoy enjojoy changed the title fix(suite): swap accounts sort Sort receive accounts in swap section Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 21
  • More info

Learn more about 𝝠 Expo Github Action

@enjojoy enjojoy marked this pull request as ready for review January 9, 2025 09:10
@enjojoy enjojoy requested review from tomasklim and izmy January 9, 2025 09:11
Comment on lines +18 to +26
const accountTypeOrder: Record<AccountType, number> = {
normal: 0,
ledger: 1,
legacy: 2,
imported: 3,
segwit: 4,
coinjoin: 5,
taproot: 6,
};
Copy link
Member

Choose a reason for hiding this comment

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

I guess Bitcoiners will not be happy to have legacy accounts before segwit and taproot

I would expect something like:

  1. normal (BTC, ETH, SOL,...)
  2. taproot (BTC)
  3. segwit (BTC)
  4. coinjoin (BTC)
  5. ledger (ETH, SOL)
  6. legacy (BTC, ETH)
  7. imported (??? mobile)

Please someone confirm @hynek-jina @marekrjpolak

Copy link
Member

Choose a reason for hiding this comment

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

I think we already have to have some ordering in Suite because it logically orders accounts in sidebar

Copy link
Member

Choose a reason for hiding this comment

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

I would stick to that and reuse it
Screenshot 2025-01-14 at 15 41 39

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.

Trading - when swapping receive accounts list is not organised by account number
3 participants