From 14cfa44fc556a809996f52dc667565f2209e2be3 Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Tue, 11 Aug 2026 22:40:37 +0200 Subject: [PATCH] refactor(signals): drop the now-unused fmtMoney helper It was lifted from BacktestPanel during the extraction, then lost its last caller in the same branch when avg_trade_pnl became an EV / trade tile rendered with fmtSignedMoney and disappeared from the monitor footnote. formatPrice already covers a bare unsigned amount if one is ever needed again. Co-Authored-By: Claude Opus 5 --- frontend/src/lib/format.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/frontend/src/lib/format.ts b/frontend/src/lib/format.ts index f107527..a4821e8 100644 --- a/frontend/src/lib/format.ts +++ b/frontend/src/lib/format.ts @@ -110,21 +110,10 @@ export function fmtRatio(v: number | null | undefined): string { return v === null || v === undefined ? '—' : v.toFixed(2); } -/** - * Bare amount, no currency symbol and no sign. e.g. 1234.5 → "1,234.50" - * Kept separate from fmtSignedMoney on purpose — they are not interchangeable. - */ -export function fmtMoney(v: number | null | undefined): string { - if (v === null || v === undefined) return '—'; - return v.toLocaleString('en-US', { - minimumFractionDigits: 2, - maximumFractionDigits: 2, - }); -} - /** * Signed currency, using U+2212 for negatives. e.g. -12.3 → "−$12.30" * Use wherever a value can go negative and the unit is money. + * (For a bare unsigned amount there is already `formatPrice` above.) */ export function fmtSignedMoney(v: number | null | undefined): string { if (v === null || v === undefined) return '—';