Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-11 14:26:30 +05:00
parent 7493e56a52
commit c5a596d7fc
6 changed files with 42 additions and 0 deletions

View file

@ -99,6 +99,7 @@ dependencies {
/** Feature Apis */
implementation(projects.features.details.api)
implementation(projects.features.hotWallet.api)
implementation(projects.features.manageTokens.api)
implementation(projects.features.markets.api)
implementation(projects.features.onboardingV2.api)

View file

@ -81,6 +81,8 @@ internal interface WalletWarningsClickIntents {
fun onSeedPhraseSecondNotificationAccept()
fun onSeedPhraseSecondNotificationReject()
fun onFinishWalletActivationClick()
}
@Suppress("LongParameterList")
@ -369,6 +371,10 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
}
}
override fun onFinishWalletActivationClick() {
// TODO implement wallet activation process
}
private fun getSelectedUserWallet(): UserWallet? {
val userWalletId = stateHolder.getSelectedWalletId()
return getUserWalletUseCase(userWalletId).getOrElse {

View file

@ -117,6 +117,7 @@ internal object WalletScreenPreviewData {
buttons = persistentListOf(buyButton),
warnings = persistentListOf(
WalletNotification.Warning.SomeNetworksUnreachable,
WalletNotification.FinishWalletActivation { },
),
bottomSheetConfig = null,
tokensListState = textContentTokensState,

View file

@ -61,6 +61,7 @@ internal class WalletWarningsAnalyticsSender @Inject constructor(
is WalletNotification.Warning.NetworksUnreachable,
is WalletNotification.UsedOutdatedData,
is WalletNotification.UnlockVisaAccess,
is WalletNotification.FinishWalletActivation,
-> null
is WalletNotification.Critical.SeedPhraseNotification -> MainScreen.NoticeSeedPhraseSupport
is WalletNotification.Critical.SeedPhraseSecondNotification -> MainScreen.NoticeSeedPhraseSupportSecond

View file

@ -55,6 +55,8 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
addCriticalNotifications(userWallet, seedPhraseIssueStatus, clickIntents)
addFinishWalletActivationNotification(userWallet, clickIntents)
addReferralPromoNotification(cardTypesResolver, clickIntents, shouldShowReferralPromo)
addInformationalNotifications(cardTypesResolver, maybeTokenList, clickIntents)
@ -259,6 +261,23 @@ internal class GetMultiWalletWarningsFactory @Inject constructor(
if (condition) add(element = element)
}
private fun MutableList<WalletNotification>.addFinishWalletActivationNotification(
userWallet: UserWallet,
clickIntents: WalletClickIntents,
) {
if (userWallet !is UserWallet.Hot) return
// TODO [REDACTED_TASK_KEY] set an actual value
val shouldShowFinishActivation = false
addIf(
element = WalletNotification.FinishWalletActivation(
onFinishClick = clickIntents::onFinishWalletActivationClick,
),
condition = shouldShowFinishActivation,
)
}
private companion object {
const val MAX_REMAINING_SIGNATURES_COUNT = 10
}

View file

@ -255,6 +255,20 @@ sealed class WalletNotification(val config: NotificationConfig) {
),
)
data class FinishWalletActivation(
val onFinishClick: () -> Unit,
) : WalletNotification(
config = NotificationConfig(
title = resourceReference(R.string.hw_activation_need_title),
subtitle = resourceReference(R.string.hw_activation_need_description),
iconResId = R.drawable.img_knight_shield_32,
buttonsState = NotificationConfig.ButtonsState.SecondaryButtonConfig(
text = resourceReference(R.string.hw_activation_need_finish),
onClick = onFinishClick,
),
),
)
data class ReferralPromo(
val onCloseClick: () -> Unit,
val onClick: () -> Unit,