diff --git a/src/components/terminal-fill-swaps.tsx b/src/components/terminal-fill-swaps.tsx index 97e2005bd..1e3930102 100644 --- a/src/components/terminal-fill-swaps.tsx +++ b/src/components/terminal-fill-swaps.tsx @@ -57,7 +57,17 @@ export function TerminalFillSwaps({ swaps, terminals, focus }: { swaps: FillSamp }; return f.sort((a, b) => (v(a) - v(b)) * sort.dir); }, [swaps, terminal, side, venue, ref, sort]); - const nameOf = (slug: string) => terminals.find((t) => t.slug === slug)?.name ?? slug; + const nameOf = (slug: string) => terminals.find((t) => t.slug === slug)?.name ?? PRODUCT_NAMES[productOf(slug)] ?? productOf(slug); + // The row's product for the logo and the link, and what the slug's suffix means for the reader. + const productOf = (slug: string) => slug.replace(ROW_SUFFIX, ""); + const legOf = (slug: string): { text: string; title: string } | null => { + const m = slug.match(ROW_SUFFIX); + if (!m) return null; + if (m[1] === "funding") return { text: "funding leg", title: "A bridge leg through Relay, not a swap: what the user sent on one chain against what was delivered on the other (FOMO: into its Solana wallet; BasedBot: the gas coin into its wallet on Robinhood Chain, BNB, Base or Ethereum). In the JSON, out of the product's published figure." }; + const chain = CHAIN_NAMES[m[1]] ?? m[1]; + if (slug.startsWith("fomo-")) return { text: `on ${chain} via Relay`, title: `A FOMO trade delivered on ${chain} by a Relay solver: the user paid from the FOMO wallet on Solana` }; + return { text: chain, title: `A swap of this product on ${chain}, read from its router there` }; + }; const filtered = terminal !== (focus ?? "") || side || venue || ref; const reset = () => { setTerminal(focus ?? ""); @@ -185,8 +195,13 @@ export function TerminalFillSwaps({ swaps, terminals, focus }: { swaps: FillSamp