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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 '—';
|
||||
|
||||
Reference in New Issue
Block a user