Updated on 2026-08-14

This commit is contained in:
Tangem 2024-12-31 14:44:40 +03:00
parent 8e1763dee2
commit 504a49949a
33 changed files with 408 additions and 25 deletions

View file

@ -28,9 +28,6 @@ import com.tangem.datasource.local.config.environment.EnvironmentConfigStorage
import com.tangem.datasource.local.config.issuers.IssuersConfigStorage
import com.tangem.datasource.local.logs.AppLogsStore
import com.tangem.datasource.local.preferences.AppPreferencesStore
import com.tangem.datasource.local.preferences.PreferencesKeys.WAS_LOG_FILE_CLEARED
import com.tangem.datasource.local.preferences.utils.getSyncOrDefault
import com.tangem.datasource.local.preferences.utils.store
import com.tangem.domain.appcurrency.repository.AppCurrencyRepository
import com.tangem.domain.apptheme.GetAppThemeModeUseCase
import com.tangem.domain.apptheme.repository.AppThemeModeRepository
@ -69,11 +66,8 @@ import com.tangem.wallet.BuildConfig
import dagger.hilt.EntryPoints
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.rekotlin.Store
import kotlin.collections.MutableMap
import kotlin.collections.listOf
import kotlin.collections.set
import com.tangem.tap.domain.walletconnect2.domain.LegacyWalletConnectRepository as WalletConnect2Repository
@ -220,12 +214,15 @@ abstract class TangemApplication : Application(), ImageLoaderFactory {
private fun updateLogFiles() {
appLogsStore.deleteOldLogsFile()
scope.launch {
if (!appPreferencesStore.getSyncOrDefault(WAS_LOG_FILE_CLEARED, false)) {
appLogsStore.deleteLastLogFile()
appPreferencesStore.store(WAS_LOG_FILE_CLEARED, true)
}
}
appLogsStore.deleteLastLogFile()
// Temporally logs are not saved
// scope.launch {
// if (!appPreferencesStore.getSyncOrDefault(WAS_LOG_FILE_CLEARED, false)) {
// appLogsStore.deleteLastLogFile()
// appPreferencesStore.store(WAS_LOG_FILE_CLEARED, true)
// }
// }
}
fun init() {

View file

@ -159,4 +159,10 @@ internal object WalletsDomainModule {
dispatchers = dispatchers,
)
}
@Provides
@Singleton
fun providesSeedPhraseNotificationUseCase(walletsRepository: WalletsRepository): SeedPhraseNotificationUseCase {
return SeedPhraseNotificationUseCase(walletsRepository = walletsRepository)
}
}

View file

@ -692,6 +692,14 @@ private fun handleBackupAction(appState: () -> AppState?, action: BackupAction)
)
}
scope.launch {
userWallet?.let {
if (it.scanResponse.cardTypesResolver.isWallet2() && it.isImported) {
store.inject(DaggerGraphState::walletsRepository).markWallet2WasCreated(it.walletId)
}
}
}
val notActivatedCardIds = gatherCardIds(backupState, card).mapNotNull {
if (store.state.globalState.onboardingState.onboardingManager?.isActivationFinished(it) == true) {
null