Updated on 2026-08-14

This commit is contained in:
Tangem 2025-12-18 14:53:01 +04:00
parent 85a2344f62
commit 92523aa0da
2 changed files with 11 additions and 3 deletions

View file

@ -108,6 +108,13 @@ object NotificationsFactory {
}
}
// Must be called last shown only when no other notifications exist
fun MutableList<NotificationUM>.addHighFeeNotificationIfNoOther(shouldShowHighFeeNotification: Boolean) {
if (shouldShowHighFeeNotification && this.isEmpty()) {
add(NotificationUM.Info.YieldSupplyHighNetworkFee)
}
}
fun MutableList<NotificationUM>.addReserveAmountErrorNotification(
reserveAmount: BigDecimal?,
sendingAmount: BigDecimal,

View file

@ -5,6 +5,7 @@ import com.tangem.common.routing.AppRouter
import com.tangem.common.ui.notifications.NotificationUM
import com.tangem.common.ui.notifications.NotificationsFactory.addExceedsBalanceNotification
import com.tangem.common.ui.notifications.NotificationsFactory.addFeeUnreachableNotification
import com.tangem.common.ui.notifications.NotificationsFactory.addHighFeeNotificationIfNoOther
import com.tangem.core.analytics.api.AnalyticsEventHandler
import com.tangem.core.decompose.di.ModelScoped
import com.tangem.core.decompose.model.Model
@ -75,9 +76,9 @@ internal class YieldSupplyNotificationsModel @Inject constructor(
onReload = params.callback::onFeeReload,
)
if (data.shouldShowHighFeeNotification) {
add(NotificationUM.Info.YieldSupplyHighNetworkFee)
}
addHighFeeNotificationIfNoOther(
shouldShowHighFeeNotification = data.shouldShowHighFeeNotification,
)
}
sendAnalytics(notifications, cryptoCurrencyStatus.currency)