Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-13 10:02:00 +02:00
parent 8b49dc2f7f
commit 6fdbff6fa8
11 changed files with 379 additions and 44 deletions

View file

@ -116,6 +116,7 @@ dependencies {
implementation(projects.domain.core)
implementation(projects.domain.demo.models)
implementation(projects.domain.feedback.models)
implementation(projects.domain.marketing)
implementation(projects.domain.markets.models)
implementation(projects.domain.nft.models)
implementation(projects.domain.onramp.models)

View file

@ -24,6 +24,7 @@ import com.tangem.domain.apptheme.model.AppThemeMode
import com.tangem.domain.assetsdiscovery.usecase.StartAssetsDiscoveryUseCase
import com.tangem.domain.balancehiding.GetBalanceHidingSettingsUseCase
import com.tangem.domain.common.wallets.UserWalletsListRepository
import com.tangem.domain.marketing.WarmUpMarketingCampaignsUseCase
import com.tangem.domain.models.wallet.*
import com.tangem.domain.notifications.GetIsHuaweiDeviceWithoutGoogleServicesUseCase
import com.tangem.domain.notifications.repository.NotificationsRepository
@ -131,6 +132,7 @@ internal class WalletModel @Inject constructor(
private val addressBookFeatureToggles: AddressBookFeatureToggles,
private val startAssetsDiscoveryUseCase: StartAssetsDiscoveryUseCase,
private val syncAddressBooksUseCase: SyncAddressBooksUseCase,
private val warmUpMarketingCampaignsUseCase: WarmUpMarketingCampaignsUseCase,
val screenLifecycleProvider: ScreenLifecycleProvider,
val innerWalletRouter: InnerWalletRouter,
) : Model() {
@ -155,6 +157,7 @@ internal class WalletModel @Inject constructor(
maybeMigrateNames()
maybeSetWalletFirstTimeUsage()
preloadPushNotificationPreferences()
warmUpMarketingCampaigns()
updateYieldSupplyApy()
subscribeToUserWalletsUpdates()
subscribeOnBalanceHiding()
@ -203,6 +206,12 @@ internal class WalletModel @Inject constructor(
}
}
private fun warmUpMarketingCampaigns() {
modelScope.launch(dispatchers.io) {
warmUpMarketingCampaignsUseCase()
}
}
private fun preloadPushNotificationPreferences() {
if (!pushNotificationSettingsFeatureToggles.isPushNotificationSettingsEnabled) return
getWalletsUseCase()