Skip to content

bug: fiat amount reads as zero with arabic-indic digits #1965

Open

Description

@ovitrif

Description

On a device whose locale uses Arabic-Indic digits (for example Arabic), a fiat amount that the app writes into the amount keypad stops parsing after an edit: the screen still shows a nonzero amount, but the amount becomes zero and Continue is disabled.

Steps

  1. Set the device language to Arabic (Arabic-Indic digits).
  2. Open an amount screen with the number pad (send, or transfer to spending) and show the amount in fiat.
  3. Tap 25% or Max (or switch the unit while an amount is entered), then tap delete once.

Expected: the amount shrinks by one digit and stays valid.
Observed: the amount shows digits but is treated as zero; Continue is disabled.

Cause

AmountInputViewModel.setSats and switchUnit load formatDisplayTextFromAmount's text into the keypad's raw input. For fiat that text comes from BigDecimal.formatCurrency (models/Currency.kt), whose DecimalFormatSymbols(Locale.getDefault()) keeps the locale's zero digit, so the raw input holds Arabic-Indic digits. convertFiatToSats then fails toDoubleOrNull() on it. Typed digits are ASCII, so only amounts the app writes are affected.

Fix direction

Keep the keypad's raw input in ASCII digits regardless of how the amount is displayed (format the raw input with Locale.US digits, or build it from the sats value directly).

Found in review of #1961: #1961 (review)

Activity

  1. added this to the 3.3.0 milestone on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions