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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user