From b0ce9da471897b678690d2be1c08741efb26573f Mon Sep 17 00:00:00 2001 From: Depo-dev <24318346+Depo-dev@users.noreply.github.com> Date: Wed, 28 Oct 2026 15:57:47 +0100 Subject: [PATCH] fix(dapp): count cash-outs in the admin overview's volume-by-type chart HEADLINE_KINDS in admin-metrics.ts already included offramp, and the API correctly returned it (confirmed against production: $127.58 of $131.58 in the last 7 days was offramp). The donut's own whitelist, COUNTED, was never updated when offramp was added as a kind, so it filtered that row out before rendering -- a period that was 97% cash-outs by dollar value showed as "100% Swaps". --- apps/dapp/app/admin/page.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/dapp/app/admin/page.tsx b/apps/dapp/app/admin/page.tsx index 95d3087a..f8e03dfe 100644 --- a/apps/dapp/app/admin/page.tsx +++ b/apps/dapp/app/admin/page.tsx @@ -4,8 +4,14 @@ import { DonutChart, OutcomeBars, RankedBars, TrendChart } from '../../component import { EmptyNote, Kpi, PageTitle, Panel, WithStats } from '../../components/admin/parts' import { formatCount, formatPercent, formatUsd, kindLabel } from '../../components/admin/stats' -/** The types the headline volume adds up, so the donut and the total agree. */ -const COUNTED = ['swap', 'plan', 'offer', 'send'] +/** + * The types the headline volume adds up, so the donut and the total agree. + * Mirrors HEADLINE_KINDS in admin-metrics.ts — out of sync once already, + * when offramp was added there and not here: the total counted cash-outs, + * the donut silently dropped them, and a period that was 97% cash-outs by + * dollar value read as "100% Swaps". + */ +const COUNTED = ['swap', 'plan', 'offer', 'send', 'offramp'] export default function AdminOverviewPage(): JSX.Element { return ( @@ -26,7 +32,7 @@ export default function AdminOverviewPage(): JSX.Element { note={ overview.unvalued > 0 ? `${formatCount(overview.unvalued)} transactions had no price` - : 'Swaps, limit and standing orders, sends' + : 'Swaps, limit and standing orders, sends, cash-outs' } />