Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-14 11:31:03 +04:00
parent 951226f28f
commit c7792de43b
10 changed files with 30 additions and 81 deletions

View file

@ -16,7 +16,9 @@ import com.tangem.core.decompose.navigation.Router
import com.tangem.core.decompose.ui.UiMessageSender
import com.tangem.core.navigation.settings.SettingsManager
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.message.*
import com.tangem.core.ui.message.DialogMessage
import com.tangem.core.ui.message.EventMessageAction
import com.tangem.core.ui.message.SnackbarMessage
import com.tangem.domain.common.util.cardTypesResolver
import com.tangem.domain.demo.IsDemoCardUseCase
import com.tangem.domain.models.scan.CardDTO
@ -39,7 +41,6 @@ import com.tangem.feature.walletsettings.entity.WalletSettingsItemUM
import com.tangem.feature.walletsettings.entity.WalletSettingsUM
import com.tangem.feature.walletsettings.impl.R
import com.tangem.feature.walletsettings.utils.ItemsBuilder
import com.tangem.features.nft.NFTFeatureToggles
import com.tangem.features.pushnotifications.api.analytics.PushNotificationAnalyticEvents
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import kotlinx.collections.immutable.PersistentList
@ -63,12 +64,11 @@ internal class WalletSettingsModel @Inject constructor(
private val analyticsContextProxy: AnalyticsContextProxy,
private val getShouldSaveUserWalletsSyncUseCase: ShouldSaveUserWalletsSyncUseCase,
private val isDemoCardUseCase: IsDemoCardUseCase,
private val nftFeatureToggles: NFTFeatureToggles,
private val getWalletNFTEnabledUseCase: GetWalletNFTEnabledUseCase,
getWalletNFTEnabledUseCase: GetWalletNFTEnabledUseCase,
private val enableWalletNFTUseCase: EnableWalletNFTUseCase,
private val disableWalletNFTUseCase: DisableWalletNFTUseCase,
private val notificationsToggles: NotificationsFeatureToggles,
private val getWalletNotificationsEnabledUseCase: GetWalletNotificationsEnabledUseCase,
getWalletNotificationsEnabledUseCase: GetWalletNotificationsEnabledUseCase,
private val setNotificationsEnabledUseCase: SetNotificationsEnabledUseCase,
private val settingsManager: SettingsManager,
private val permissionsRepository: PermissionRepository,
@ -101,7 +101,6 @@ internal class WalletSettingsModel @Inject constructor(
userWallet = wallet,
dialogNavigation = dialogNavigation,
isRenameWalletAvailable = isRenameWalletAvailable,
isNFTFeatureEnabled = nftFeatureToggles.isNFTEnabled,
isNFTEnabled = nftEnabled,
isNotificationsEnabled = notificationsEnabled,
isNotificationsFeatureEnabled = notificationsToggles.isNotificationsEnabled,
@ -127,7 +126,6 @@ internal class WalletSettingsModel @Inject constructor(
userWallet: UserWallet,
dialogNavigation: SlotNavigation<DialogConfig>,
isRenameWalletAvailable: Boolean,
isNFTFeatureEnabled: Boolean,
isNFTEnabled: Boolean,
isNotificationsFeatureEnabled: Boolean,
isNotificationsEnabled: Boolean,
@ -141,7 +139,7 @@ internal class WalletSettingsModel @Inject constructor(
isManageTokensAvailable = userWallet.isMultiCurrency,
isRenameWalletAvailable = isRenameWalletAvailable,
renameWallet = { openRenameWalletDialog(userWallet, dialogNavigation) },
isNFTFeatureEnabled = isNFTFeatureEnabled && userWallet.isMultiCurrency,
isNFTFeatureEnabled = userWallet.isMultiCurrency,
isNFTEnabled = isNFTEnabled,
onCheckedNFTChange = ::onCheckedNFTChange,
forgetWallet = {