mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-25 06:01:11 +00:00
Moving the token list app-side (readTokensConfig) dropped the module tokenList()'s base58->hex normalization, so a token's definitionId now reaches the swap view in whatever encoding TOKENS_CONFIG uses — base58 in practice. The swap account selector filtered holdings on the hex definitionIdHex field using that value, so a base58 id matched nothing and every token showed "No funds", blocking swaps. Make the selector encoding-aware: a 64-char hex id filters definitionIdHex, otherwise the base58 definitionId. tokenHoldings already emits both encodings per holding, so this matches whichever the config uses, needs no app-side base58 decoder, and mirrors how the liquidity view already filters. The swap quote/submit path already normalizes base58->hex in the module, so nothing else changes.