Updated on 2026-08-14
This commit is contained in:
parent
d78f54ac91
commit
ad05b94b55
9 changed files with 36 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ internal class TokenDetailsNotificationsAnalyticsSender(
|
|||
is TokenDetailsNotification.TopUpWithoutReserve,
|
||||
is TokenDetailsNotification.RentInfo,
|
||||
is TokenDetailsNotification.SwapPromo,
|
||||
is TokenDetailsNotification.NetworkShutdown,
|
||||
-> null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,11 @@ internal sealed class TokenDetailsNotification(val config: NotificationConfig) {
|
|||
),
|
||||
)
|
||||
|
||||
class NetworksNoAccount(val network: String, val symbol: String, val amount: String) : Informational(
|
||||
data class NetworksNoAccount(
|
||||
private val network: String,
|
||||
private val symbol: String,
|
||||
private val amount: String,
|
||||
) : Informational(
|
||||
title = resourceReference(R.string.warning_no_account_title),
|
||||
subtitle = resourceReference(
|
||||
id = R.string.no_account_generic,
|
||||
|
|
@ -175,4 +179,9 @@ internal sealed class TokenDetailsNotification(val config: NotificationConfig) {
|
|||
formatArgs = wrappedList(coinSymbol),
|
||||
),
|
||||
)
|
||||
|
||||
data class NetworkShutdown(private val title: TextReference, private val subtitle: TextReference) : Warning(
|
||||
title = title,
|
||||
subtitle = subtitle,
|
||||
)
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.feature.tokendetails.presentation.tokendetails.state.factory
|
||||
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.domain.common.extensions.fromNetworkId
|
||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||
import com.tangem.domain.tokens.model.warnings.CryptoCurrencyWarning
|
||||
|
|
@ -8,6 +9,7 @@ import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDeta
|
|||
import com.tangem.feature.tokendetails.presentation.tokendetails.state.components.TokenDetailsNotification
|
||||
import com.tangem.feature.tokendetails.presentation.tokendetails.state.components.TokenDetailsNotification.*
|
||||
import com.tangem.feature.tokendetails.presentation.tokendetails.viewmodels.TokenDetailsClickIntents
|
||||
import com.tangem.features.tokendetails.impl.R
|
||||
import com.tangem.utils.converter.Converter
|
||||
import com.tangem.utils.extensions.removeBy
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
|
|
@ -78,6 +80,10 @@ internal class TokenDetailsNotificationConverter(
|
|||
onSwapClick = clickIntents::onSwapPromoClick,
|
||||
onCloseClick = clickIntents::onSwapPromoDismiss,
|
||||
)
|
||||
is CryptoCurrencyWarning.BeaconChainShutdown -> NetworkShutdown(
|
||||
title = resourceReference(R.string.warning_beacon_chain_retirement_title),
|
||||
subtitle = resourceReference(R.string.warning_beacon_chain_retirement_content),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue