Add a "1 <currency> to Sats" field

Shows the inverse of the existing "1 BTC to <currency>" rate — how
many Sats one unit of the default currency is worth — right below it.
Useful since many currencies are worth less than, or a low multiple
of, a single Sat.

CurrencyConverter.satsPerCurrencyUnit(rate) does the actual division;
ConverterUiState.oneCurrencyToSats() derives the display string from
the already-fetched rate the same way defaultCurrencyRate() does, so
no new ViewModel state was needed. Wired into both Compose and the
iOS bridge/SwiftUI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXcrACM5sok3M1KQJ8kByy
This commit is contained in:
2026-09-10 10:04:38 +03:00
co-authored by Claude Sonnet 5
parent 2d60fda72b
commit 947f8bf81a
7 changed files with 49 additions and 0 deletions
+11
View File
@@ -105,6 +105,17 @@ struct ContentView: View {
}
}
}
if !state.oneCurrencyToSats.isEmpty {
HStack {
Text(IosLocalizationKt.localizedFormattedString(
resource: MR.strings.shared.currency_to_sats,
args: [state.defaultCurrencyCode]
))
Spacer()
Text(NumberFormatKt.groupDigits(value: state.oneCurrencyToSats))
}
}
}
if let error = state.errorMessage {