Repository navigation
fix(dapp): count cash-outs in the admin overview's volume-by-type chart - #149
Merged
Merged
Conversation
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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
COUNTEDinapp/admin/page.tsx, a frontend-only whitelist of kinds the donut sums, was never updated whenofframpwas added toHEADLINE_KINDSinadmin-metrics.ts. The API itself was always correct.