Area: Frontend Β· frontend/src/services/stellar-impl.ts (scValToString, getTokenInfoByAddress, getTokenEvents)
Description
For scvAddress values of contract type, scValToString returns the raw 32-byte contract ID as a
hex string instead of the canonical C... StrKey encoding (stellar-impl.ts:254-256,
StrKey.encodeContract is never used). Every event field that holds a token contract address
(created.tokenAddress, mint.tokenAddress, burn.tokenAddress, meta.tokenAddress) is therefore
stored in an encoding no other part of the system uses. Downstream:
getTokenInfoByAddress(tokenAddress) compares e.data.tokenAddress === tokenAddress where the
argument is a C... StrKey β the comparison never matches, so every token falls into the
fallback branch (name = raw address, decimals = 7, no creator, no metadata).
getTokenEvents filters the same way β the per-token history view is always empty.
- Transaction History and CSV export show meaningless hex blobs where addresses should be, and
explorer links built from them are dead.
Tasks
Acceptance criteria
- All addresses surfaced in events, history, CSV, and explorer links are canonical StrKey strings.
getTokenInfoByAddress returns real name/symbol/creator data for a token found in events, and the
per-token history view is populated β both proven by tests.
Issue 11 of 20 from the codebase audit tracked in ISSUES.md.
Area: Frontend Β·
frontend/src/services/stellar-impl.ts(scValToString,getTokenInfoByAddress,getTokenEvents)Description
For
scvAddressvalues of contract type,scValToStringreturns the raw 32-byte contract ID as ahex string instead of the canonical
C...StrKey encoding (stellar-impl.ts:254-256,StrKey.encodeContractis never used). Every event field that holds a token contract address(
created.tokenAddress,mint.tokenAddress,burn.tokenAddress,meta.tokenAddress) is thereforestored in an encoding no other part of the system uses. Downstream:
getTokenInfoByAddress(tokenAddress)comparese.data.tokenAddress === tokenAddresswhere theargument is a
C...StrKey β the comparison never matches, so every token falls into thefallback branch (name = raw address, decimals = 7, no creator, no metadata).
getTokenEventsfilters the same way β the per-token history view is always empty.explorer links built from them are dead.
Tasks
StrKey.encodeContract(addr.contractId())inscValToString(and audit the account branch for muxed-account handling while there).
scValToNative+ a thin formatting layer over the hand-rolled decoder where possible, tolean on the SDK's canonical conversions.
C.../G...outputs for contract and accountaddresses respectively.
getTokenInfoByAddressandgetTokenEventsproving a created token'sevents are found by its StrKey address.
Acceptance criteria
getTokenInfoByAddressreturns real name/symbol/creator data for a token found in events, and theper-token history view is populated β both proven by tests.
Issue 11 of 20 from the codebase audit tracked in
ISSUES.md.