Parity/native asset display name#2887
Draft
piyalbasu wants to merge 3 commits into
Draft
Conversation
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>
Contributor
|
PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-1ec1cf1985dd60e2f8a5 (SDF collaborators only — install instructions in the release description) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.