Complexity: High — 200 pts
Summary
StellarFlow currently only supports XLM and USDC. This issue adds a "Manage Assets" page where users can discover and add trustlines for additional Stellar-issued assets (wBTC, yXLM, etc.), and dynamically updates the Send and Swap pages to support any asset the user holds.
Files to Create/Modify
- Create:
src/lib/assets.ts — KNOWN_ASSETS registry (code, issuer, name, logo)
- Create:
src/pages/ManageAssetsPage.tsx
- Modify:
src/lib/stellar.ts — add buildChangeTrustTx
- Modify:
src/pages/SendPage.tsx — dynamic asset list from balances
- Modify:
src/pages/SwapPage.tsx — dynamic asset selectors
- Modify:
src/App.tsx — add /assets route
- Modify:
src/pages/DashboardPage.tsx — add "Manage Assets" link
Implementation Notes
assets.ts
Define a KNOWN_ASSETS: StellarAsset[] array with at least 4 assets beyond USDC (e.g. yXLM, AQUA) — each with code, issuer, name, logoSymbol.
buildChangeTrustTx in stellar.ts
export async function buildChangeTrustTx(sourceAddress, assetCode, assetIssuer, remove = false): Promise<string>
Uses Operation.changeTrust({ asset, limit: remove ? '0' : undefined }).
ManageAssetsPage
- List
KNOWN_ASSETS with an "Added" badge for assets already in balances
- "Add" → build, sign, submit changeTrust tx
- "Remove" → only enabled when balance is 0
- Search bar filters by code or name
Dynamic selectors
Update SendPage and SwapPage to derive their asset dropdown options from the live balances array instead of a hardcoded XLM/USDC list.
Acceptance Criteria
Screen Recording Requirements
- Open Manage Assets → list of known assets
- Click Add on yXLM → Freighter sign → trustline added
- Dashboard now shows yXLM with 0 balance
- Send page asset selector now includes yXLM
- Remove yXLM trustline (balance 0) → disappears from Dashboard
Complexity: High — 200 pts
Summary
StellarFlow currently only supports XLM and USDC. This issue adds a "Manage Assets" page where users can discover and add trustlines for additional Stellar-issued assets (wBTC, yXLM, etc.), and dynamically updates the Send and Swap pages to support any asset the user holds.
Files to Create/Modify
src/lib/assets.ts—KNOWN_ASSETSregistry (code, issuer, name, logo)src/pages/ManageAssetsPage.tsxsrc/lib/stellar.ts— addbuildChangeTrustTxsrc/pages/SendPage.tsx— dynamic asset list from balancessrc/pages/SwapPage.tsx— dynamic asset selectorssrc/App.tsx— add/assetsroutesrc/pages/DashboardPage.tsx— add "Manage Assets" linkImplementation Notes
assets.tsDefine a
KNOWN_ASSETS: StellarAsset[]array with at least 4 assets beyond USDC (e.g. yXLM, AQUA) — each withcode,issuer,name,logoSymbol.buildChangeTrustTxinstellar.tsUses
Operation.changeTrust({ asset, limit: remove ? '0' : undefined }).ManageAssetsPageKNOWN_ASSETSwith an "Added" badge for assets already inbalancesDynamic selectors
Update
SendPageandSwapPageto derive their asset dropdown options from the livebalancesarray instead of a hardcoded XLM/USDC list.Acceptance Criteria
changeTrustoperation signed by FreighterScreen Recording Requirements