Repository navigation
Conversation
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
Closed
6 of 16 tasks
Contributor
|
PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-e24d3782c85b34bf1ae9 |
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.
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:getAssetIdentities. It returns the IDs of an asset: the contract ID (if present) and theCODE:ISSUERpair (if code and issuer are present).splitVerifiedAssetCurrencybuilds 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.assetMatchesListItemuses the same rule. This changes the list names shown for a token on the Add Asset screen (getAssetListsForAsset).USDEandUSDeare different assets.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:
USDEandUSDe. Both have the issuerGDJ5BNU5NN6NQ54D7OX6NQTUYNBZ42CAT33QGM5BIQ2QIYADAC5ICH47. The Soroswap list containsUSDE,SUSDEandENAfrom this issuer. It does not containUSDe.USDeshowed 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
Expected result for the search "usde":
USDE,USDeUSDE.USDemoves to the unverified section.Checklist
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). Allextension/src/popupJest tests pass. ESLint, Prettier andtsc --noEmitpass. The change was not tested manually in a browser.The same fix for freighter-mobile is in a separate PR.
Generated by Claude Code