Skip to content

fix(dapp): count cash-outs in the admin overview's volume-by-type chart - #149

Merged
Depo-dev merged 1 commit into
Cookit-labs:mainfrom
Depo-dev:fix/admin-offramp-volume
Oct 28, 2026
Merged

Depo-dev merged 1 commit into
Cookit-labs:mainfrom
Depo-dev:fix/admin-offramp-volume

Conversation

@Depo-dev

@Depo-dev Depo-dev commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The admin dashboard's "Volume by type" donut and its total were filtering out offramp (cash-out) transactions before rendering, even though the backend correctly includes them.

Confirmed against production: in the last 7 days, offramp was $127.58 of $131.58 total volume (97%), but the donut showed "100% Swaps, $4" — the exact inverse.

Root cause: COUNTED in app/admin/page.tsx, a frontend-only whitelist of kinds the donut sums, was never updated when offramp was added to HEADLINE_KINDS in admin-metrics.ts. The API itself was always correct.

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".
@Depo-dev
Depo-dev merged commit c112ece into Cookit-labs:main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant