Updated on 2026-08-14

This commit is contained in:
Tangem 2025-10-16 16:58:38 +05:00
parent 709eb125b3
commit 8dec1af7aa
21 changed files with 124 additions and 12 deletions

View file

@ -7,6 +7,7 @@ import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.tokens.model.analytics.TokenSwapPromoAnalyticsEvent
import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsState
import com.tangem.feature.tokendetails.presentation.tokendetails.state.components.TokenDetailsNotification
import com.tangem.features.yield.supply.api.analytics.YieldSupplyAnalytics
internal class TokenDetailsNotificationsAnalyticsSender(
private val cryptoCurrency: CryptoCurrency,
@ -44,6 +45,10 @@ internal class TokenDetailsNotificationsAnalyticsSender(
is TokenDetailsNotification.KaspaIncompleteTransactionWarning -> TokenDetailsAnalyticsEvent.Notice.Reveal(
currency = cryptoCurrency,
)
is TokenDetailsNotification.YieldSupplyNotTransferedToAave -> YieldSupplyAnalytics.NoticeNotEnoughMinAmount(
token = cryptoCurrency.symbol,
blockchain = cryptoCurrency.network.name,
)
is TokenDetailsNotification.NetworksUnreachable,
is TokenDetailsNotification.ExistentialDeposit,
is TokenDetailsNotification.NetworksNoAccount,

View file

@ -6,6 +6,7 @@ import com.tangem.core.ui.components.notifications.NotificationConfig
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.networkIconResId
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.extensions.stringReference
import com.tangem.core.ui.extensions.wrappedList
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.wallet.UserWallet
@ -257,4 +258,12 @@ internal sealed class TokenDetailsNotification(val config: NotificationConfig) {
iconResId = R.drawable.ic_error_sync_24,
),
)
data class YieldSupplyNotTransferedToAave(val tokenName: String, val amount: String) : Warning(
title = resourceReference(
id = R.string.yield_module_amount_not_transfered_to_aave_title,
wrappedList(amount, tokenName),
),
subtitle = stringReference(""),
)
}

View file

@ -24,6 +24,7 @@ import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList
import timber.log.Timber
import java.math.BigDecimal
import kotlin.String
internal class TokenDetailsNotificationConverter(
private val userWalletId: UserWalletId,
@ -155,6 +156,10 @@ internal class TokenDetailsNotificationConverter(
)
is CryptoCurrencyWarning.MigrationMaticToPol -> MigrationMaticToPol
is CryptoCurrencyWarning.UsedOutdatedDataWarning -> UsedOutdatedData
is CryptoCurrencyWarning.YieldSupplyNotDepositedAmount -> YieldSupplyNotTransferedToAave(
tokenName = warning.currencySymbol,
amount = warning.amount.format { crypto(symbol = "", decimals = warning.currency.decimals) },
)
}
}