Skip to content

fix: verify classic assets by code and issuer, not issuer alone - #3041

Closed
JakeUrban wants to merge 1 commit into
masterfrom
fix/verified-asset-code-issuer-match
Closed

JakeUrban wants to merge 1 commit into
masterfrom
fix/verified-asset-code-issuer-match

Conversation

@JakeUrban

@JakeUrban JakeUrban commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What

The "Verified" check for classic assets now uses the asset code and the issuer together. Before this change, it used only the issuer.

Changes in extension/src/popup/helpers/assetList.ts:

  • New function getAssetIdentities. It returns the IDs of an asset: the contract ID (if present) and the CODE:ISSUER pair (if code and issuer are present).
  • splitVerifiedAssetCurrency builds the verified set from these IDs. An asset is verified only if one of its IDs is in the set. The issuer alone is not added to the set anymore.
  • assetMatchesListItem uses the same rule. This changes the list names shown for a token on the Add Asset screen (getAssetListsForAsset).
  • Code comparison is case-sensitive. USDE and USDe are different assets.
  • Contract tokens still match by contract ID. The native asset is still verified.

Affected screens: Add Asset search, Add Asset by issuer address, and the Swap token picker (search and popular tokens). All of them use splitVerifiedAssetCurrency.

Why

When you search for "usde" in Add Asset, two rows show in the "Verified" section: USDE and USDe. Both have the issuer GDJ5BNU5NN6NQ54D7OX6NQTUYNBZ42CAT33QGM5BIQ2QIYADAC5ICH47. The Soroswap list contains USDE, SUSDE and ENA from this issuer. It does not contain USDe. USDe showed as verified only because its issuer is on the list.

With the old rule, any asset code from an issuer on a list shows as verified. For example, a listed issuer can issue a new asset with the code USDC, and Freighter shows it as verified. This is the known issue stellar/wallet-eng-monorepo#76. The old test comments said that a fix was expected to change this behavior.

Screenshots / video

Screenshot 2026-10-22 at 11 47 09 AM

Expected result for the search "usde":

Before After
Verified: USDE, USDe Verified: USDE. USDe moves to the unverified section.

Checklist

  • I have read CONTRIBUTING.md and this PR meets its requirements.
  • This PR has narrow scope and does not mix refactoring with feature changes.
  • This PR adds tests for the new functionality or fixes.
  • These changes have been tested in both Chrome and Firefox.
  • This PR includes relevant before and after screenshots for UI changes.
  • I took the time to review my own PR.

Tests: new unit tests in assetList.test.ts (same issuer with a different code is not verified, issuer alone does not match, contract token matches by contract ID). All extension/src/popup Jest tests pass. ESLint, Prettier and tsc --noEmit pass. The change was not tested manually in a browser.

The same fix for freighter-mobile is in a separate PR.


Generated by Claude Code

An asset was shown as verified when any asset list entry shared its
issuer, without checking the asset code. So every code an issuer
minted was verified when the list named only one of them (for example
USDe from the issuer of the listed USDE).

Classic assets now match a list entry only when both code and issuer
match. Contract tokens still match by contract ID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014B2zysccigTczhF1iiZNuu
@github-actions

Copy link
Copy Markdown
Contributor

PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-e24d3782c85b34bf1ae9
Backend: V1 prod + V2 beta (no sandbox configured for @JakeUrban). SDF collaborators only — install instructions in the release description.

@JakeUrban JakeUrban closed this Oct 22, 2026
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.

2 participants