From aedcc9d481bc3f38464792bc6a46cc9ac87fae31 Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 21 Nov 2025 17:46:00 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../yield/supply/impl/main/model/YieldSupplyModel.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/main/model/YieldSupplyModel.kt b/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/main/model/YieldSupplyModel.kt index 186a7c5bdc..5754705f8e 100644 --- a/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/main/model/YieldSupplyModel.kt +++ b/features/yield-supply/impl/src/main/java/com/tangem/features/yield/supply/impl/main/model/YieldSupplyModel.kt @@ -306,8 +306,9 @@ internal class YieldSupplyModel @Inject constructor( private fun loadActiveState(cryptoCurrencyStatus: CryptoCurrencyStatus, yieldSupplyStatus: YieldSupplyStatus) { val cryptoCurrencyToken = cryptoCurrency as? CryptoCurrency.Token ?: return val showWarningIcon = !yieldSupplyStatus.isAllowedToSpend - val showInfoIconPrevState = when (uiState) { - is YieldSupplyUM.Content -> uiState.showInfoIcon + val state = uiState.value + val isShowInfoIconPrevState = when (state) { + is YieldSupplyUM.Content -> state.showInfoIcon else -> false } if (!yieldSupplyStatus.isAllowedToSpend) { @@ -337,7 +338,7 @@ internal class YieldSupplyModel @Inject constructor( ), onClick = ::onActiveClick, showWarningIcon = showWarningIcon, - showInfoIcon = showInfoIconPrevState, + showInfoIcon = isShowInfoIconPrevState, apy = tokenStatus.apy.toString(), ) } @@ -355,7 +356,7 @@ internal class YieldSupplyModel @Inject constructor( rewardsApy = TextReference.EMPTY, onClick = ::onActiveClick, showWarningIcon = showWarningIcon, - showInfoIcon = showInfoIconPrevState, + showInfoIcon = isShowInfoIconPrevState, apy = "", ) }