Skip to content

Render rates directionally across dashboard surfaces#145

Merged
anderdc merged 2 commits into
testfrom
fix/rate-direction-labels
Jul 15, 2026
Merged

Render rates directionally across dashboard surfaces#145
anderdc merged 2 commits into
testfrom
fix/rate-direction-labels

Conversation

@LandynDev

Copy link
Copy Markdown
Collaborator

Stored rates are canonical "spoke per 1 SOL" in BOTH direction quotes; the UI was rendering reverse-leg values as if per-direction — off by ~476x (e.g. BTC->SOL showing 0.0021 instead of ~476) and sorting reverse legs worst-first.

  • Shared boundary helpers: format.ts directionalRate/rateUnit/isReverseLeg (canonical_pair rule, lockstep with python), MinersDashboard directionalRateFor/rateUnitFor
  • Converted at ingest so EMA/Tukey/y-ranges share the directional scale: marketRate completedPoints, MarketRateChart crown line + tooltips, CrownRateChart panels, CrownDirectionSegment (ticker + sticky header), CrownGridHoverCard
  • Fixed value + unit + sort/best-deal on MinerRatesTable, OrderbookDepth, RateQuoteHelper (incl. the copyable jq snippet: reverse sorts ascending and zero/null quotes filtered), MinerDetailHeader, RateHistoryTable
  • One rateUnit source for every TO/FROM suffix

Verified: tsc + vite build, prettier.

@anderdc anderdc merged commit 5acc1d2 into test Jul 15, 2026
2 checks passed
@anderdc anderdc deleted the fix/rate-direction-labels branch July 15, 2026 18:57
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