Skip to content

Add separate BTC and USD monitoring pages#135

Merged
TaprootFreak merged 3 commits intodevelopfrom
feature/monitoring-btc-usd-pages
Feb 14, 2026
Merged

Add separate BTC and USD monitoring pages#135
TaprootFreak merged 3 commits intodevelopfrom
feature/monitoring-btc-usd-pages

Conversation

@TaprootFreak
Copy link
Contributor

Summary

  • Add /monitoring/btc page aggregating all BTC-equivalent holdings (onchain, LND, Lightning, cBTC, WBTC, WBTCe) with balance sheet showing holdings vs. customer balance
  • Add /monitoring/usd page aggregating all USD-equivalent holdings (JUSD, USDC, USDT) across Citrea, Ethereum, and Polygon
  • Frontend-only aggregation using existing /monitoring/data endpoint, no backend changes needed
  • Add cross-navigation links between all monitoring pages

Test plan

  • Verify /monitoring/btc loads and shows correct BTC aggregation
  • Verify /monitoring/usd loads and shows correct USD aggregation
  • Verify existing /monitoring page still works
  • Verify navigation links between all three pages
  • Verify sats-to-BTC conversion is correct
  • Verify no double-counting of cBTC (citreaBalance vs evmBalances)

Add /monitoring/btc page aggregating all BTC-equivalent holdings
(onchain, LND, Lightning, cBTC, WBTC, WBTCe) with balance sheet.
Add /monitoring/usd page aggregating all USD-equivalent holdings
(JUSD, USDC, USDT across chains). Both pages fetch from existing
/monitoring/data endpoint with frontend-only aggregation.
@TaprootFreak TaprootFreak marked this pull request as ready for review February 14, 2026 15:33
* Add historical balance charts for BTC and USD monitoring

Add Chart.js line charts with 24h/7d/30d range selection to the
BTC and USD monitoring pages. BTC shows net balance (holdings minus
customer), USD shows total stablecoin holdings.

Backend: new history endpoints with raw/hourly/daily aggregation
using MSSQL FORMAT-based grouping and forward-fill merge logic.

Includes Playwright e2e tests and mock server for chart rendering.

* Add e2e tests for BTC/USD monitoring pages and navigation

Cover table rendering, sats-to-BTC conversion, token balances,
total calculations and cross-page navigation.
@TaprootFreak TaprootFreak requested a review from Danswar February 14, 2026 16:03
Load the last known balance record before the query time window
to initialize forward-fill state. Prevents false zero values at
the start of BTC and USD history charts when data sources have
different update frequencies.
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.

2 participants