Problem
Three issues affect how the library handles Stellar-specific data formats and edge cases.
1. truncateAddress does not handle Stellar contract IDs (starting with C)
Stellar Soroban contract IDs start with C and are 56 characters long — the same length as account addresses. truncateAddress works correctly for them already, but the function's JSDoc only mentions "addresses" and "tx hashes". Contract IDs passed from ContractEventFeed should be documented as a supported input.
2. AssetBadge does not handle liquidity_pool_shares asset type
The Balance type includes "liquidity_pool_shares" as a valid assetType value, but AssetBadge only checks for "native". A liquidity_pool_shares balance renders with whatever balance.assetCode is, which is often undefined, causing the icon to show "un" (from "undefined".slice(0, 2)).
3. TransactionHistory does not handle operationCount > 1 visually
Transaction has operationCount but it is never displayed. Transactions with multiple operations (e.g. path payments, account merges) look identical to single-operation transactions. A small badge or indicator showing "2 ops" would provide useful context.
Solution
- Update
truncateAddress JSDoc to document contract IDs as a valid input type.
- Add a
liquidity_pool_shares case to AssetBadge that renders a "LP" label with a neutral colour.
- Add an
operationCount badge to TxRow when tx.operationCount > 1.
Acceptance Criteria
Note for Contributors: Write a clear PR description. Include a screenshot of the LP badge in AssetBadge and the multi-operation badge in TxRow.
Problem
Three issues affect how the library handles Stellar-specific data formats and edge cases.
1.
truncateAddressdoes not handle Stellar contract IDs (starting withC)Stellar Soroban contract IDs start with
Cand are 56 characters long — the same length as account addresses.truncateAddressworks correctly for them already, but the function's JSDoc only mentions "addresses" and "tx hashes". Contract IDs passed fromContractEventFeedshould be documented as a supported input.2.
AssetBadgedoes not handleliquidity_pool_sharesasset typeThe
Balancetype includes"liquidity_pool_shares"as a validassetTypevalue, butAssetBadgeonly checks for"native". Aliquidity_pool_sharesbalance renders with whateverbalance.assetCodeis, which is oftenundefined, causing the icon to show"un"(from"undefined".slice(0, 2)).3.
TransactionHistorydoes not handleoperationCount > 1visuallyTransactionhasoperationCountbut it is never displayed. Transactions with multiple operations (e.g. path payments, account merges) look identical to single-operation transactions. A small badge or indicator showing "2 ops" would provide useful context.Solution
truncateAddressJSDoc to document contract IDs as a valid input type.liquidity_pool_sharescase toAssetBadgethat renders a "LP" label with a neutral colour.operationCountbadge toTxRowwhentx.operationCount > 1.Acceptance Criteria
truncateAddressJSDoc mentions contract IDs as valid inputAssetBadgerenders "LP" badge forliquidity_pool_shareswithout undefined displayTxRowshows an operation count badge whenoperationCount > 1npm run buildpasses