Updated on 2026-08-14
This commit is contained in:
parent
929dae92c3
commit
f10002c0e5
2 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.features.yield.supply.impl.subcomponents.notifications
|
||||
|
||||
import androidx.compose.animation.animateContentSize
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
|
|
@ -35,6 +36,7 @@ internal class YieldSupplyNotificationsComponent(
|
|||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.animateContentSize(),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
state.forEachIndexed { index, item ->
|
||||
Notification(
|
||||
|
|
|
|||
|
|
@ -91,7 +91,9 @@ internal class YieldSupplyNotificationsModel @Inject constructor(
|
|||
|
||||
uiState.update { notifications.toPersistentList() }
|
||||
|
||||
yieldSupplyNotificationsUpdateListener.callbackHasError(notifications.any())
|
||||
// Business requirement that YieldSupplyHighNetworkFee is not an error and doesn't block the button
|
||||
val hasError = notifications.any { it !is NotificationUM.Info.YieldSupplyHighNetworkFee }
|
||||
yieldSupplyNotificationsUpdateListener.callbackHasError(hasError)
|
||||
}.launchIn(modelScope)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue