Skip to content

Introduce AmountUi model to centralize monetary display formatting #1014

Description

@jvsena42

Context

Follow-up from PR #787 review thread: #787 (comment)

Monetary values are currently formatted inline in multiple places (e.g. NotifyChannelReadyHandler.formatNotificationAmount), each re-deriving the same display rules:

  • BTC vs fiat ordering based on PrimaryDisplay
  • symbol prefix/suffix placement per currency locale (formatCurrencyWithSymbol / SUFFIX_SYMBOL_CURRENCIES)
  • bitcoin symbol + value composition (bitcoinDisplay)

Proposal

Introduce an AmountUi model class to encapsulate all requirements related to displaying monetary values, so the same formatting rules (including the locale-based prefix/suffix symbol rule already applied to the main in-app amount UI) can be enforced everywhere with minimal effort.

Notes

  • This was flagged as a nit: / out-of-scope future work during PR fix: handle cjit channel ready notification #787 review.
  • The prefix/suffix concern raised in the same thread is already handled for fiat via formatCurrencyWithSymbol; this issue is about consolidating the formatting logic into a reusable model rather than duplicating it.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions