Skip to content

Conversation

@piotr-iohk
Copy link
Collaborator

Fixes #733

This PR fixes currency symbol placement for currencies that display the symbol after the amount (PLN, CZK, SEK, CHF, NOK, DKK, HUF, and others).

Description

  1. Adds a SUFFIX_SYMBOL_CURRENCIES set in Currency.kt as single source of truth for currencies whose symbol goes after the amount
  2. Adds isSymbolSuffix property and formattedWithSymbol() method to ConvertedAmount
  3. Updates all UI components that display currency amounts: BalanceHeaderView, MoneyText, NumberPadTextField, WalletBalanceView, ActivityRow
  4. Replaces manual symbol concatenation in NotifyPaymentReceivedHandler, ReceiveConfirmScreen, and SendCoinSelectionScreen with formattedWithSymbol()
  5. Adds 12 unit tests for the new formatting logic

Adding a new suffix currency only requires adding it to the SUFFIX_SYMBOL_CURRENCIES set — all UI components derive behavior from it.

Preview

Screen.Recording.2026-02-09.at.14.08.04.mov

QA Notes

1. Suffix currency — home screen balance

  • Go to Settings > General > Local currency
  • Select PLN (or CZK, SEK, CHF)
  • Go to home screen
  • Verify the large balance shows amount before symbol (e.g., "9 999 zł")
  • Verify the small secondary balance also shows correct order
  • Toggle primary display (tap balance) — verify both BTC-primary and fiat-primary show correct positions

2. Suffix currency — send/receive amount input

  • With PLN selected, open Send flow
  • Verify the number pad input shows symbol after amount
  • Verify the "Available" balance below also shows correct order
  • Repeat for Receive amount screen

3. Suffix currency — activity list

  • With PLN selected, check transaction rows in activity
  • Verify amounts show symbol after value in both primary and secondary lines

4. Suffix currency — notifications

  • With PLN selected, receive a payment
  • Verify the notification body shows correct symbol position (e.g., "0.35zł")

5. Prefix currency — regression

  • Switch to USD (or EUR, GBP)
  • Repeat checks 1-4
  • Verify symbols still appear before amounts ($10.50, €10.50, £10.50)

6. Hidden balance

  • Enable swipe-to-hide on home screen
  • Verify hidden dots display correctly for both prefix and suffix currencies

Some currencies like PLN, EUR, CZK display their symbol after the amount
(e.g., "0.35zł" not "zł0.35"), while others like USD, GBP display it
before. This adds formattedWithSymbol() to ConvertedAmount which formats
amounts with proper symbol placement based on the currency code.
@piotr-iohk piotr-iohk force-pushed the fix/currency-symbol-position branch from 788b741 to 46057d7 Compare February 9, 2026 13:29
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Code review findings

@ovitrif
Copy link
Collaborator

ovitrif commented Feb 10, 2026

@piotr-iohk usually the Swift and Kotlin coding languages have built-in APIs for locale-based number formatting (and currency specific variants).

Did you already try to inquire with your AI agent if using those is not feasible here?!

You normally should get the "perfect" placement of currency symbol for all locales.

@piotr-iohk
Copy link
Collaborator Author

@piotr-iohk usually the Swift and Kotlin coding languages have built-in APIs for locale-based number formatting (and currency specific variants).

Did you already try to inquire with your AI agent if using those is not feasible here?!

You normally should get the "perfect" placement of currency symbol for all locales.

Guess the same thing here: synonymdev/bitkit-ios#434 (comment)

@claude
Copy link

claude bot commented Feb 10, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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.

Currency symbol displayed in wrong position for PLN, CZK, SEK and other currencies

2 participants