Skip to content

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Jan 19, 2026

This PR centralizes how monetary values are formatted in error messages.

Description

  • Formats shortfall amounts in error toasts according to user's display unit preference
  • Supports both Modern (sats with space grouping) and Classic (BTC with decimals) formats
  • Uses device locale for consistent number formatting

Preview

Modern Classic
format.mp4
classic.mp4

QA Notes

1. Modern Display

  1. Set display unit to Modern in Settings
  2. Scan a Lightning invoice exceeding your balance
  3. Verify the error toast shows the shortfall with space grouping (e.g., "1 000 000")

2. Classic Display

  1. Switch to Classic display unit
  2. Trigger the same error
  3. Verify the amount shows as BTC decimals (e.g., "0.01000000")

Note

Merge this PR only AFTER merging the PR of its target branch:

  • 625

@ovitrif ovitrif changed the base branch from master to fix/address-validation January 19, 2026 15:35
@ovitrif ovitrif changed the title feat: address validation with formatted errors feat: add FormatMoneyValue use case Jan 19, 2026
@ovitrif ovitrif changed the title feat: add FormatMoneyValue use case feat: centralize money formatting logic Jan 19, 2026
@ovitrif ovitrif marked this pull request as ready for review January 19, 2026 15:49
@ovitrif ovitrif mentioned this pull request Jan 19, 2026
Base automatically changed from fix/address-validation to master January 19, 2026 15:52
@claude

This comment has been minimized.

Copy link
Contributor

@ben-kaufman ben-kaufman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tAck

@ovitrif ovitrif merged commit 6be2092 into master Jan 19, 2026
43 of 51 checks passed
@ovitrif ovitrif deleted the feat/format-money-value branch January 19, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants