Skip to content

Unified currency mode counts unconvertible foreign amounts at face value #670

Description

@sarim2000

Problem

CurrencyConversionService.convertAmount() returns the original amount unchanged when no exchange rate is available (CurrencyConversionService.kt line ~70). Every unified-mode surface that uses it — the Analytics category breakdown, totals, trend, Home card conversions — therefore silently counts e.g. a USD 10 expense as ₹10 when the rate lookup fails, corrupting totals and percentages.

The category pie widget (#665 / #669) deliberately diverges: it looks up the rate directly and leaves the transaction out when no rate exists, since counting face value in another currency is never right (hard constraint: money is currency-tagged).

Options to make surfaces agree

  1. Adopt the widget's behavior everywhere: skip unconvertible transactions from unified aggregates, and ideally surface a small "N transactions not converted" hint.
  2. Keep last-known-good rates cached persistently so a failed refresh still converts with a stale (but honest) rate — reduces how often option 1's skip triggers.

Option 1 + 2 combined is probably right: stale rate beats no rate; skip beats face-value.

Found while addressing review feedback on #669.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions