Repository navigation
fix(routes): suggest Solana USDC and add missing network icons - #1214
Conversation
There was a problem hiding this comment.
LGTM. This is a small, self-contained change to the Routes demo's ranking and icon lookup.
What was reviewed:
quickRoutesrank tiers: traced both tests by hand. The existing case still gives base, eth-usdt, arb because eth-usdt and arb now share tier 2 and keep their input order. The new case gives base, solana, eth-usdt.TokenLogo: Tempo chains still use chain/address. Other chains fall back totempoIssued[symbol], and a broken image still drops to the official mark or monogram throughonError.- New CAIP-2 keys: OP 10, Arbitrum 42161 and Avalanche 43114 match the known chain IDs, and Stellar uses
stellar:pubnet. - Not done here: I didn't run Vitest, Biome or typecheck.
node_modulesisn't installed in this checkout, so I couldn't confirm that the four new~icons/token-branded/*names exist in the icon set.
Extended reasoning...
The change touches three files in the docs site's Routes demo: chain and token icon maps in RouteIcons.tsx, the quickRoutes sort ranking in routes-test.ts, and one new unit test. It touches no auth, injection or data-exposure surface. The only external input is a fixed tokenlist.tempo.xyz icon URL, built from a hardcoded map. The diff is about 40 lines, follows the existing patterns, and the ranking change has a test. The repository has no CODEOWNERS or OWNERS file, and the PR timeline has no reviewer objections.
There was a problem hiding this comment.
LGTM. This is a small, self-contained change to the Routes demo's icon map and the order of its suggested routes.
What was reviewed:
- Walked the new four-tier
quickRoutesrank through the added test. It produces base, solana-ousd, eth-usdt, and the per-network fill skips the second Solana route as expected. Non-USDC and other USDC routes into Tempo now share rank 2, which keeps the earlier test's ordering. - Checked the IDs against the repo.
stellar:pubnetmatchessrc/lib/stellar-wallets.ts, and the OUSD path uses the OUSD address cited across the docs. TheTokenLogofallback still goes throughonErrorto the official marks and then the monogram. - Not done here: running Vitest,
check:typesor the build, or confirming that the four new~icons/token-branded/*names exist.node_modulesisn't present in this checkout.
Extended reasoning...
The change touches only the Routes demo UI: four new chain logos in a CAIP-2 keyed map, a symbol-keyed icon path for OUSD bridged to other networks, and a reordered rank function in quickRoutes with a new unit test. It touches no security-sensitive surface such as auth, secrets or user input handling. Beyond the existing https://tokenlist.tempo.xyz image URL, it adds only a constant path segment. No CODEOWNERS or OWNERS files cover these paths. The rank logic is easy to follow, and its result for the new test case matches when worked through by hand.
There was a problem hiding this comment.
LGTM. This is a small, self-contained change to demo route ranking and icon lookup.
What was reviewed:
quickRoutesranking: I traced the new test fixture by hand. Base USDC→USDC.e ranks 0, Solana USDC→OUSD 1, Ethereum USDC→OUSD 2, and everything else 3, so the expected order is['base', 'solana-ousd', 'eth-ousd'].TokenLogo: Tempo-chain tokens still get${tempo}/${address}. ThetempoIssuedsymbol lookup is only used as a fallback, and the OUSD address matches the one used across the docs.- Not done: the
@ iconify-json/token-brandedset isn't installed in this checkout, so I couldn't confirm that thearbitrum-one,avalanche,optimismandstellaricon names exist. If one is missing, the build will fail, so it won't break quietly.
Extended reasoning...
The change touches one React icon component (RouteIcons.tsx), the quickRoutes ranking in routes-test.ts, and one new unit test. It has no security-sensitive surface: no auth, no user input handling, and only a static image URL built from constant map entries. The ranking logic is a few lines, and the new test pins down the intended order. No CODEOWNERS file covers these paths, and the timeline shows no outstanding objections from other reviewers. The hunt ended on dry_streak with no findings.
The Routes demo now suggests Solana USDC → Tempo OUSD and Ethereum USDC → Tempo OUSD in place of Optimism USDC and Ethereum OUSD. Optimism, Arbitrum, Avalanche and Stellar now show their network logos on the demo and Supported routes pages, where they had been falling back to letter placeholders.
quickRoutesnow ranks Solana USDC → Tempo OUSD, then Ethereum USDC → Tempo OUSD, right after Base USDC → Tempo USDC.e. Solana is last in the directory, so the one-route-per-network fill never reached it before. The suggestions are now Base USDC → USDC.e, Solana USDC → OUSD and Ethereum USDC → OUSD. The demo funds Solana routes through deposit addresses, as before.Checked:
vitest run src/lib/routes-test.test.tspasses, along withbiome checkandcheck:types. I loaded both pages locally against the live route directory: on Supported routes, only Arc rows still have placeholders.