You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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:PrimaryDisplayformatCurrencyWithSymbol/SUFFIX_SYMBOL_CURRENCIES)bitcoinDisplay)Proposal
Introduce an
AmountUimodel 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
nit:/ out-of-scope future work during PR fix: handle cjit channel ready notification #787 review.formatCurrencyWithSymbol; this issue is about consolidating the formatting logic into a reusable model rather than duplicating it.🤖 Generated with Claude Code