Updated on 2026-08-14

This commit is contained in:
Tangem 2022-05-23 20:27:10 +03:00
parent 7d2fc1d6ee
commit 6362f1e101
2 changed files with 7 additions and 6 deletions

View file

@ -48,7 +48,7 @@ class AppCurrencyMiddleware(
fiatCurrenciesPrefStorage.save(currenciesList)
store.dispatchDialogShow(
AppDialog.CurrencySelectionDialog(
currenciesList = storedFiatCurrencies.mapToUiModel(),
currenciesList = currenciesList.mapToUiModel(),
currentAppCurrency = appCurrencyProvider.invoke()
)
)

View file

@ -23,12 +23,13 @@ object CurrencySelectionDialog {
.setTitle(context.getString(R.string.details_row_title_currency))
.setNegativeButton(context.getString(R.string.common_cancel)) { _, _ -> /* no-op */ }
.setPositiveButton(context.getString(R.string.common_done)) { _, _ ->
val selectedCurrency = dialog.currenciesList[currentSelection]
store.dispatch(
WalletAction.AppCurrencyAction.SelectAppCurrency(
fiatCurrency = selectedCurrency
dialog.currenciesList.getOrNull(currentSelection)?.let { selectedCurrency ->
store.dispatch(
WalletAction.AppCurrencyAction.SelectAppCurrency(
fiatCurrency = selectedCurrency
)
)
)
}
}
.setOnDismissListener {
store.dispatchDialogHide()