Updated on 2026-08-14
This commit is contained in:
parent
afcde269ce
commit
13ae7be53f
2 changed files with 3 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ import com.tangem.utils.converter.Converter
|
|||
internal class CurrencyConverter : Converter<AppCurrency, AppCurrencySelectorState.Currency> {
|
||||
|
||||
override fun convert(value: AppCurrency): AppCurrencySelectorState.Currency {
|
||||
val fullCurrencyName = with(value) { "$name ($code) - $symbol" }
|
||||
val fullCurrencyName = with(value) { "$name ($code) — $symbol" }
|
||||
|
||||
return AppCurrencySelectorState.Currency(value.code, fullCurrencyName)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ internal class DefaultAppCurrencyRepository(
|
|||
.collect(::send)
|
||||
}
|
||||
|
||||
launch(dispatchers.io) {
|
||||
withContext(dispatchers.io) {
|
||||
if (selectedAppCurrencyStore.isEmpty()) {
|
||||
fetchDefaultAppCurrency()
|
||||
}
|
||||
|
|
@ -47,6 +47,7 @@ internal class DefaultAppCurrencyRepository(
|
|||
|
||||
val currencies = availableAppCurrenciesStore.getAllSyncOrNull()
|
||||
?.map(appCurrencyConverter::convert)
|
||||
?.sortedBy(AppCurrency::name)
|
||||
|
||||
requireNotNull(currencies) {
|
||||
"No available currencies stored"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue