Updated on 2026-08-14

This commit is contained in:
Tangem 2023-12-11 16:26:53 +03:00
parent 8b50cdc381
commit df9a00188b

View file

@ -384,7 +384,7 @@ internal class SwapViewModel @Inject constructor(
val stateSuccess = state.getLastLoadedSuccessStates()
return if (stateSuccess.isNotEmpty()) {
val currentSelected = dataState.selectedProvider
if (currentSelected != null && state.keys.contains(currentSelected)) {
if (currentSelected != null && stateSuccess.keys.contains(currentSelected)) {
currentSelected
} else {
findBestQuoteProvider(stateSuccess) ?: stateSuccess.keys.first()