Skip to content

fix: align currency and calc widget with ios#884

Open
piotr-iohk wants to merge 15 commits intomasterfrom
fix/currency-widget-consistency-881
Open

fix: align currency and calc widget with ios#884
piotr-iohk wants to merge 15 commits intomasterfrom
fix/currency-widget-consistency-881

Conversation

@piotr-iohk
Copy link
Copy Markdown
Collaborator

@piotr-iohk piotr-iohk commented Apr 2, 2026

Fixes #881

Description

This PR:

  1. Shows currency symbols in the "Other Currencies" section of the local currency settings (previously only currency codes were displayed)
  2. Truncates 3+ character fiat symbols in the calculator widget icon badge to prevent layout overflow, matching iOS behavior from:
  3. Pre-fills new calculator widgets with a default BTC value of 10 000 and auto-derives the fiat equivalent on first load
  4. Removes auto-clear-on-focus behavior from both BTC and fiat inputs so values persist when switching between fields
  5. Hardens calculator field input by sanitizing pasted and typed values for BTC/fiat and preventing classic-mode fiat from being rehydrated back to zero after clearing
  6. Switches fiat input keyboard to decimal type and uses space as grouping separator instead of comma

Preview

Screen.Recording.2026-04-03.at.17.45.25.mov

QA Notes

1. Currency settings symbols

  1. Go to Settings -> Local currency
  2. Scroll to "Other Currencies"
  3. Verify each currency shows its symbol in parentheses (e.g. "AED (د.إ)")
  4. Verify "Most Used" section still shows symbols as before

2. Calculator widget symbol truncation

  1. Add a calculator widget on the home screen
  2. Change local currency to CHF or XDR
  3. Verify the fiat icon badge shows a single character ("C" or "X"), not the full code
  4. Change to a 1-2 char symbol currency (USD, EUR, PLN) and verify it renders normally
Screen_recording_20260423_071500.webm

3. Calculator widget default value

  1. Remove existing calculator widget (if any)
  2. Add a new calculator widget
  3. Verify BTC field shows "10 000" and fiat field shows the converted amount
  4. Verify both fields are editable without clearing on focus
Screen_recording_20260423_073524.webm

4. Calculator input behavior

  1. Tap fiat field, type a value (e.g. "12.34") — verify decimal input works
  2. Tap BTC field — verify fiat value is preserved (not cleared)
  3. Tap fiat field again — verify BTC value is preserved
  4. Delete all in fiat field — verify you can type a new value including "."
  5. Verify fiat uses space grouping (e.g. "1 234.56" not "1,234.56")
Screen_recording_20260423_080014.webm

5. Calculator paste and clear edge cases

  1. In MODERN denomination, paste malformed BTC input containing punctuation (for example 1000087188..........,,,,,)
  2. Verify BTC shows only the sanitized sat value and does not display pasted punctuation
  3. In CLASSIC denomination, clear fiat completely and verify it stays empty instead of snapping back to 0
  4. Paste 8 into the empty fiat field in CLASSIC denomination and verify it behaves consistently
Screen_recording_20260423_081652.webm

@piotr-iohk piotr-iohk added this to the 2.2.0 milestone Apr 2, 2026
@piotr-iohk piotr-iohk self-assigned this Apr 3, 2026
@piotr-iohk piotr-iohk marked this pull request as ready for review April 3, 2026 15:57
…onents/CalculatorCard.kt

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@piotr-iohk piotr-iohk removed this from the 2.2.0 milestone Apr 7, 2026
@piotr-iohk piotr-iohk marked this pull request as draft April 7, 2026 17:19
@ovitrif ovitrif added this to the 2.3.0 milestone Apr 7, 2026
@jvsena42 jvsena42 assigned jvsena42 and unassigned piotr-iohk and jvsena42 Apr 22, 2026
@jvsena42 jvsena42 marked this pull request as ready for review April 23, 2026 11:18
@jvsena42 jvsena42 requested review from ovitrif April 23, 2026 12:02
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.

[Bug]: currency settings and calculator widget inconsistent with iOS

3 participants