Skip to content

Parity/native asset display name#2887

Draft
piyalbasu wants to merge 3 commits into
masterfrom
parity/native-asset-display-name
Draft

Parity/native asset display name#2887
piyalbasu wants to merge 3 commits into
masterfrom
parity/native-asset-display-name

Conversation

@piyalbasu

Copy link
Copy Markdown
Contributor

No description provided.

piyalbasu and others added 3 commits July 1, 2026 17:55
In the send flow asset picker (TokenList), each row now shows the asset
code after the balance amount on the second line (e.g. "100 XLM" instead
of "100"), and the native asset's first line reads "Stellar Lumens"
instead of "XLM". Mirrors freighter-mobile's balance row formatting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The blockaidScan swap tests asserted the asset row was visible via a loose
getByText(/USDC/) / getByText(/XLM/) locator, then clicked the row's
-balance testid. Now that the row's second line includes the asset code
("100 USDC"), the regex matches both the heading and the balance line,
tripping Playwright strict mode. Assert visibility on the -balance testid
the test already clicks, which is unambiguous and intention-revealing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Introduce a shared getDisplayName()/getDisplayNameFromCode() helper in
helpers/transaction.ts (native -> "Stellar Lumens", else soroban symbol or
code) and adopt it everywhere a balance row/tile shows an asset's name label:
the send/swap picker (TokenList), the main account list (AccountAssets), the
swap selected-asset tiles (AssetTile + SwapAmount balance strings), and the
asset detail header/title. The asset code (e.g. "XLM") stays as the amount/
ticker suffix everywhere. This brings the extension in line with
freighter-mobile's BalanceRow convention:

  Stellar Lumens
  100 XLM

Replaces the inline isNative/t("Stellar Lumens") logic added to TokenList in
the prior commit; the name is a product proper noun, so it is not localized
(matching mobile).

Updates unit tests (AssetTile, Swap) and e2e tests (sendPayment, reviewTxFees)
whose locators matched the old bare "XLM"/code label; ambiguous getByText
asset locators now target the row's -balance testid or the new name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-1ec1cf1985dd60e2f8a5 (SDF collaborators only — install instructions in the release description)

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