diff --git a/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt b/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt index 38e2ac9240..2837f48f2a 100644 --- a/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt +++ b/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt @@ -452,8 +452,12 @@ internal class StateBuilder( ) else -> SwapWarning.GeneralWarning( notificationConfig = NotificationConfig( - title = resourceReference(R.string.common_error), - subtitle = if (dataError.code == DataError.UnknownError.code) { + title = if (dataError is DataError.UnknownError) { + resourceReference(R.string.common_error) + } else { + resourceReference(R.string.warning_express_refresh_required_title) + }, + subtitle = if (dataError is DataError.UnknownError) { resourceReference(R.string.swapping_generic_error) } else { resourceReference(R.string.generic_error_code, wrappedList(dataError.code.toString())) diff --git a/features/swap/presentation/src/main/java/com/tangem/feature/swap/viewmodels/SwapViewModel.kt b/features/swap/presentation/src/main/java/com/tangem/feature/swap/viewmodels/SwapViewModel.kt index ac172210c3..b17c398d2e 100644 --- a/features/swap/presentation/src/main/java/com/tangem/feature/swap/viewmodels/SwapViewModel.kt +++ b/features/swap/presentation/src/main/java/com/tangem/feature/swap/viewmodels/SwapViewModel.kt @@ -346,9 +346,7 @@ internal class SwapViewModel @Inject constructor( ) } is SwapState.SwapError -> { - if (state.error is DataError.UnknownError) { - singleTaskScheduler.cancelTask() - } + singleTaskScheduler.cancelTask() uiState = stateBuilder.createQuotesErrorState( uiStateHolder = uiState, swapProvider = provider,