Fix hardcoded $ in forecast comparison text
Some checks are pending
CI / semgrep (push) Waiting to run

The "vs last month" line in the forecast section used a hardcoded $
instead of the user's selected currency symbol and rate. Use
asCompactCurrency() which handles both.

Closes #197
This commit is contained in:
iamtoruk 2026-05-02 16:16:43 -07:00
parent c511627e87
commit 87b660e584

View file

@ -515,7 +515,7 @@ private struct ForecastInsight: View {
guard previous > 0 else { return "no prior month" }
let diff = ((projection - previous) / previous) * 100
let sign = diff >= 0 ? "+" : ""
return "\(sign)\(String(format: "%.0f", diff))% vs last month ($\(String(format: "%.0f", previous)))"
return "\(sign)\(String(format: "%.0f", diff))% vs last month (\(previous.asCompactCurrency()))"
}
}