Skip to content

fix(accounts): hide the account secondary label when it duplicates the primary [PERA-4523]#936

Draft
yasin-ce wants to merge 2 commits into
mainfrom
yasince/fix/PERA-4523
Draft

fix(accounts): hide the account secondary label when it duplicates the primary [PERA-4523]#936
yasin-ce wants to merge 2 commits into
mainfrom
yasince/fix/PERA-4523

Conversation

@yasin-ce

Copy link
Copy Markdown
Collaborator

Description

  • Hides the account secondary label wherever it would just repeat the primary (e.g. a custom name identical to the NFD, or a name that is the account's own address) — fixes the account name rendering twice in the Swap header.
  • The dedupe rule lives in shared/package utils (dedupeSecondaryLabel, getAccountDisplayName) so every call site behaves the same; AccountDisplay's label derivation is extracted into a colocated useAccountDisplay hook.
  • Centralizes the short/long address truncation lengths into canonical constants in @perawallet/wallet-core-shared.

Related Issues

Checklist

  • Have you tested your changes locally?
  • Have you reviewed the code for any potential issues?
  • Have you documented any necessary changes in the project's documentation?
  • Have you added any necessary tests for your changes?
  • Have you updated any relevant dependencies?

Additional Notes

  • The address-name suppression in getAccountDisplayName applies wallet-wide (any account whose name equals its own address now renders as a single truncated address everywhere), not just on the touched screens.

@yasin-ce
yasin-ce force-pushed the yasince/fix/PERA-4523 branch 2 times, most recently from 197a82a to 78c4b8d Compare July 20, 2026 17:30
@yasin-ce
yasin-ce force-pushed the yasince/fix/PERA-4523 branch from 78c4b8d to 18bd42e Compare July 23, 2026 15:05
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.

1 participant