From 1c6575d3a5a810d1295030a9d922cc41cbee0176 Mon Sep 17 00:00:00 2001 From: Uddhav <255779543+letstokenize@users.noreply.github.com> Date: Tue, 1 Dec 2026 04:21:53 +0000 Subject: [PATCH 1/3] fix(routes): suggest Solana USDC and add missing network icons --- src/components/RouteIcons.tsx | 22 ++++++++++++++++++---- src/lib/routes-test.test.ts | 9 +++++++++ src/lib/routes-test.ts | 10 ++++++---- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/components/RouteIcons.tsx b/src/components/RouteIcons.tsx index 0a8b7e414..fc219bfb1 100644 --- a/src/components/RouteIcons.tsx +++ b/src/components/RouteIcons.tsx @@ -2,13 +2,17 @@ import { type ComponentType, type SVGProps, useState } from 'react' import { cx } from 'zyzz' +import LogoArbitrum from '~icons/token-branded/arbitrum-one' +import LogoAvalanche from '~icons/token-branded/avalanche' import LogoBase from '~icons/token-branded/base' import LogoBnb from '~icons/token-branded/bnb' import LogoEthereum from '~icons/token-branded/ethereum' import LogoHyperEvm from '~icons/token-branded/hyper-evm' import LogoMonad from '~icons/token-branded/monad' +import LogoOptimism from '~icons/token-branded/optimism' import LogoPolygon from '~icons/token-branded/polygon' import LogoSolana from '~icons/token-branded/solana' +import LogoStellar from '~icons/token-branded/stellar' import LogoTron from '~icons/token-branded/tron' import LogoUsdc from '~icons/token-branded/usdc' import LogoUsdt from '~icons/token-branded/usdt' @@ -21,16 +25,24 @@ type Logo = ComponentType> // Official chain marks (Web3 Icons) keyed by CAIP-2 id, matching the console's Routes map. const chainLogos: Record = { 'eip155:1': LogoEthereum, + 'eip155:10': LogoOptimism, 'eip155:137': LogoPolygon, 'eip155:143': LogoMonad, + 'eip155:42161': LogoArbitrum, + 'eip155:43114': LogoAvalanche, 'eip155:56': LogoBnb, 'eip155:8453': LogoBase, 'eip155:999': LogoHyperEvm, 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': LogoSolana, + 'stellar:pubnet': LogoStellar, 'tron:0x2b6653dc': LogoTron, } // Tempo chains whose tokens have icons in the token list service. const tempoChainIds: Record = { 'eip155:4217': 4217, 'eip155:42431': 42431 } +// Tempo-issued tokens bridged to other networks share their Tempo icon, keyed by symbol. +const tempoIssued: Record = { + OUSD: '4217/0x20c0000000000000000000006a37da5c996874be', +} // Off-Tempo stablecoins with an official mark, by symbol family. const tokenLogo = (symbol: string): Logo | undefined => /^USDC/i.test(symbol) ? LogoUsdc : /^USDT/i.test(symbol) ? LogoUsdt : undefined @@ -84,8 +96,9 @@ export function ChainLogo({ } /** - * A token's icon: Tempo tokens load theirs from the token list service, other stablecoins use - * their official mark, and anything else falls back to a monogram. + * A token's icon: Tempo tokens, and Tempo-issued tokens on other networks, load theirs from the + * token list service, other stablecoins use their official mark, and anything else falls back to + * a monogram. */ export function TokenLogo({ chainId, @@ -102,13 +115,14 @@ export function TokenLogo({ const [broken, setBroken] = useState(false) const tempo = chainId ? tempoChainIds[chainId] : undefined const address = tokenKey ? erc20Address(tokenKey) : undefined - if (symbol && tempo && address && !broken) + const icon = tempo && address ? `${tempo}/${address}` : symbol ? tempoIssued[symbol] : undefined + if (symbol && icon && !broken) return ( setBroken(true)} - src={`https://tokenlist.tempo.xyz/icon/${tempo}/${address}.svg`} + src={`https://tokenlist.tempo.xyz/icon/${icon}.svg`} /> ) const Logo = symbol ? tokenLogo(symbol) : undefined diff --git a/src/lib/routes-test.test.ts b/src/lib/routes-test.test.ts index 64620e26c..41c0f6888 100644 --- a/src/lib/routes-test.test.ts +++ b/src/lib/routes-test.test.ts @@ -260,6 +260,15 @@ describe('quickRoutes', () => { ] expect(quickRoutes(routes).map((r) => r.id)).toEqual(['base', 'eth-usdt', 'arb']) }) + it('puts Solana USDC to Tempo USDC.e second when the demo can run it', () => { + const routes = [ + make('eth-usdt', 'eip155:1', 'eip155:4217', 'USDT'), + make('op', 'eip155:10', 'eip155:4217'), + make('base', 'eip155:8453', 'eip155:4217'), + make('solana', 'solana:mainnet', 'eip155:4217'), + ] + expect(quickRoutes(routes).map((r) => r.id)).toEqual(['base', 'solana', 'eth-usdt']) + }) it('skips routes the demo cannot run and fills from the rest of the directory', () => { const solanaTransferOnly = { ...make('solana', 'solana:mainnet', 'eip155:4217'), diff --git a/src/lib/routes-test.ts b/src/lib/routes-test.ts index f6d47426d..8fcd5d3ac 100644 --- a/src/lib/routes-test.ts +++ b/src/lib/routes-test.ts @@ -244,13 +244,15 @@ export function routeTestRequest(route: TestRoute, input: RouteInput) { /** * Up to `limit` routes the demo can run, offered as one-click starts: Base USDC to Tempo USDC.e - * first, then other routes into Tempo, one per source network where possible. + * first, then Solana USDC to Tempo USDC.e, then other routes into Tempo, one per source network + * where possible. */ export function quickRoutes(routes: TestRoute[], limit = 3) { const rank = (route: TestRoute) => { - if (!isTempo(route.destinationChain.id)) return 2 - const baseUsdc = route.sourceChain.id === 'eip155:8453' && route.sourceToken.symbol === 'USDC' - return baseUsdc && route.destinationToken.symbol === 'USDC.e' ? 0 : 1 + if (!isTempo(route.destinationChain.id)) return 3 + if (route.sourceToken.symbol !== 'USDC' || route.destinationToken.symbol !== 'USDC.e') return 2 + if (route.sourceChain.id === 'eip155:8453') return 0 + return route.sourceChain.id.startsWith('solana:') ? 1 : 2 } const ranked = routes .filter((route) => demoMethods(route).length > 0) From 528960be6c2ab86b49c866fd5e99d39f752de185 Mon Sep 17 00:00:00 2001 From: Uddhav <255779543+letstokenize@users.noreply.github.com> Date: Tue, 1 Dec 2026 04:26:52 +0000 Subject: [PATCH 2/3] fix(routes): suggest Solana USDC to Tempo OUSD --- src/lib/routes-test.test.ts | 11 ++++++++--- src/lib/routes-test.ts | 9 +++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/lib/routes-test.test.ts b/src/lib/routes-test.test.ts index 41c0f6888..9cdbaaed0 100644 --- a/src/lib/routes-test.test.ts +++ b/src/lib/routes-test.test.ts @@ -260,14 +260,19 @@ describe('quickRoutes', () => { ] expect(quickRoutes(routes).map((r) => r.id)).toEqual(['base', 'eth-usdt', 'arb']) }) - it('puts Solana USDC to Tempo USDC.e second when the demo can run it', () => { + it('puts Solana USDC to Tempo OUSD second when the demo can run it', () => { + const ousd = (id: string, source: string) => ({ + ...make(id, source, 'eip155:4217'), + destinationToken: { tokenKey: 'eip155:4217/erc20:ousd', symbol: 'OUSD', decimals: 6 }, + }) const routes = [ make('eth-usdt', 'eip155:1', 'eip155:4217', 'USDT'), make('op', 'eip155:10', 'eip155:4217'), make('base', 'eip155:8453', 'eip155:4217'), - make('solana', 'solana:mainnet', 'eip155:4217'), + make('solana-usdce', 'solana:mainnet', 'eip155:4217'), + ousd('solana-ousd', 'solana:mainnet'), ] - expect(quickRoutes(routes).map((r) => r.id)).toEqual(['base', 'solana', 'eth-usdt']) + expect(quickRoutes(routes).map((r) => r.id)).toEqual(['base', 'solana-ousd', 'eth-usdt']) }) it('skips routes the demo cannot run and fills from the rest of the directory', () => { const solanaTransferOnly = { diff --git a/src/lib/routes-test.ts b/src/lib/routes-test.ts index 8fcd5d3ac..8b294e13c 100644 --- a/src/lib/routes-test.ts +++ b/src/lib/routes-test.ts @@ -244,15 +244,16 @@ export function routeTestRequest(route: TestRoute, input: RouteInput) { /** * Up to `limit` routes the demo can run, offered as one-click starts: Base USDC to Tempo USDC.e - * first, then Solana USDC to Tempo USDC.e, then other routes into Tempo, one per source network + * first, then Solana USDC to Tempo OUSD, then other routes into Tempo, one per source network * where possible. */ export function quickRoutes(routes: TestRoute[], limit = 3) { const rank = (route: TestRoute) => { if (!isTempo(route.destinationChain.id)) return 3 - if (route.sourceToken.symbol !== 'USDC' || route.destinationToken.symbol !== 'USDC.e') return 2 - if (route.sourceChain.id === 'eip155:8453') return 0 - return route.sourceChain.id.startsWith('solana:') ? 1 : 2 + if (route.sourceToken.symbol !== 'USDC') return 2 + const [source, destination] = [route.sourceChain.id, route.destinationToken.symbol] + if (source === 'eip155:8453' && destination === 'USDC.e') return 0 + return source.startsWith('solana:') && destination === 'OUSD' ? 1 : 2 } const ranked = routes .filter((route) => demoMethods(route).length > 0) From 6d2650acd46b6f0e77b5e8af02f9376df672d301 Mon Sep 17 00:00:00 2001 From: Uddhav <255779543+letstokenize@users.noreply.github.com> Date: Tue, 1 Dec 2026 04:37:45 +0000 Subject: [PATCH 3/3] fix(routes): suggest Ethereum USDC to Tempo OUSD --- src/lib/routes-test.test.ts | 5 +++-- src/lib/routes-test.ts | 11 ++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/routes-test.test.ts b/src/lib/routes-test.test.ts index 9cdbaaed0..ca6b69b2f 100644 --- a/src/lib/routes-test.test.ts +++ b/src/lib/routes-test.test.ts @@ -260,7 +260,7 @@ describe('quickRoutes', () => { ] expect(quickRoutes(routes).map((r) => r.id)).toEqual(['base', 'eth-usdt', 'arb']) }) - it('puts Solana USDC to Tempo OUSD second when the demo can run it', () => { + it('puts Solana USDC, then Ethereum USDC, to Tempo OUSD after Base', () => { const ousd = (id: string, source: string) => ({ ...make(id, source, 'eip155:4217'), destinationToken: { tokenKey: 'eip155:4217/erc20:ousd', symbol: 'OUSD', decimals: 6 }, @@ -271,8 +271,9 @@ describe('quickRoutes', () => { make('base', 'eip155:8453', 'eip155:4217'), make('solana-usdce', 'solana:mainnet', 'eip155:4217'), ousd('solana-ousd', 'solana:mainnet'), + ousd('eth-ousd', 'eip155:1'), ] - expect(quickRoutes(routes).map((r) => r.id)).toEqual(['base', 'solana-ousd', 'eth-usdt']) + expect(quickRoutes(routes).map((r) => r.id)).toEqual(['base', 'solana-ousd', 'eth-ousd']) }) it('skips routes the demo cannot run and fills from the rest of the directory', () => { const solanaTransferOnly = { diff --git a/src/lib/routes-test.ts b/src/lib/routes-test.ts index 8b294e13c..21a4d7751 100644 --- a/src/lib/routes-test.ts +++ b/src/lib/routes-test.ts @@ -244,16 +244,17 @@ export function routeTestRequest(route: TestRoute, input: RouteInput) { /** * Up to `limit` routes the demo can run, offered as one-click starts: Base USDC to Tempo USDC.e - * first, then Solana USDC to Tempo OUSD, then other routes into Tempo, one per source network - * where possible. + * first, then Solana USDC and Ethereum USDC to Tempo OUSD, then other routes into Tempo, one per + * source network where possible. */ export function quickRoutes(routes: TestRoute[], limit = 3) { const rank = (route: TestRoute) => { - if (!isTempo(route.destinationChain.id)) return 3 - if (route.sourceToken.symbol !== 'USDC') return 2 + if (!isTempo(route.destinationChain.id)) return 4 + if (route.sourceToken.symbol !== 'USDC') return 3 const [source, destination] = [route.sourceChain.id, route.destinationToken.symbol] if (source === 'eip155:8453' && destination === 'USDC.e') return 0 - return source.startsWith('solana:') && destination === 'OUSD' ? 1 : 2 + if (source.startsWith('solana:') && destination === 'OUSD') return 1 + return source === 'eip155:1' && destination === 'OUSD' ? 2 : 3 } const ranked = routes .filter((route) => demoMethods(route).length > 0)