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 f2adfb4a9d..472810b335 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 @@ -450,10 +450,14 @@ internal class StateBuilder( iconResId = R.drawable.ic_alert_circle_24, ), ) - is DataError.UnknownError -> SwapWarning.GeneralWarning( + else -> SwapWarning.GeneralWarning( notificationConfig = NotificationConfig( title = resourceReference(R.string.common_error), - subtitle = resourceReference(R.string.swapping_generic_error), + subtitle = if (dataError.code == DataError.UnknownError.code){ + resourceReference(R.string.swapping_generic_error) + } else { + resourceReference(R.string.generic_error_code, wrappedList(dataError.code.toString())) + }, iconResId = R.drawable.img_attention_20, buttonsState = NotificationConfig.ButtonsState.SecondaryButtonConfig( text = resourceReference(R.string.warning_button_refresh), @@ -461,13 +465,6 @@ internal class StateBuilder( ), ), ) - else -> SwapWarning.GeneralWarning( - notificationConfig = NotificationConfig( - title = resourceReference(R.string.common_error), - subtitle = resourceReference(R.string.generic_error_code, wrappedList(dataError.code.toString())), - iconResId = R.drawable.img_attention_20, - ), - ) } }