From d050fa265441845f25e0f5b39a3855c5d131c676 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 25 Mar 2026 17:27:32 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../tangem/screens/MainScreenPageObject.kt | 18 --- .../kotlin/com/tangem/tests/WarningTest.kt | 39 ----- .../tap/di/domain/WalletsDomainModule.kt | 6 - .../data/wallets/DefaultWalletsRepository.kt | 148 ------------------ .../data/wallets/di/WalletsDataModule.kt | 2 - .../wallets/DefaultWalletsRepositoryTest.kt | 1 - .../models/SeedPhraseNotificationsStatus.kt | 8 - .../wallets/repository/WalletsRepository.kt | 13 -- .../usecase/SeedPhraseNotificationUseCase.kt | 35 ----- .../intents/WalletWarningsClickIntents.kt | 71 --------- .../analytics/WalletScreenAnalyticsEvent.kt | 12 -- .../utils/WalletWarningsAnalyticsSender.kt | 4 - .../utils/WalletWarningsSingleEventSender.kt | 20 +-- .../domain/GetMultiWalletWarningsFactory.kt | 55 +------ .../domain/GetWalletNotificationsFactory.kt | 44 +----- .../wallet/state/model/WalletAlertUM.kt | 18 --- .../wallet/state/model/WalletNotification.kt | 28 ---- .../state/model/WalletNotificationUM.kt | 58 ------- 18 files changed, 12 insertions(+), 568 deletions(-) delete mode 100644 domain/wallets/src/main/java/com/tangem/domain/wallets/models/SeedPhraseNotificationsStatus.kt delete mode 100644 domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/SeedPhraseNotificationUseCase.kt diff --git a/app/src/androidTest/kotlin/com/tangem/screens/MainScreenPageObject.kt b/app/src/androidTest/kotlin/com/tangem/screens/MainScreenPageObject.kt index 0e2ea89335..56036ef56a 100644 --- a/app/src/androidTest/kotlin/com/tangem/screens/MainScreenPageObject.kt +++ b/app/src/androidTest/kotlin/com/tangem/screens/MainScreenPageObject.kt @@ -154,24 +154,6 @@ class MainScreenPageObject(semanticsProvider: SemanticsNodeInteractionsProvider) useUnmergedTree = true } - val seedPhraseNotificationIcon: KNode = child { - hasAnySibling(withText(getResourceString(R.string.warning_seedphrase_issue_title))) - hasTestTag(NotificationTestTags.ICON) - useUnmergedTree = true - } - - val seedPhraseNotificationTitle: KNode = child { - hasTestTag(NotificationTestTags.TITLE) - hasText(getResourceString(R.string.warning_seedphrase_issue_title)) - useUnmergedTree = true - } - - val seedPhraseNotificationMessage: KNode = child { - hasTestTag(NotificationTestTags.MESSAGE) - hasText(getResourceString(R.string.warning_seedphrase_issue_message)) - useUnmergedTree = true - } - val totalBalanceContainer: KNode = child { hasTestTag(MainScreenTestTags.WALLET_LIST_ITEM) } diff --git a/app/src/androidTest/kotlin/com/tangem/tests/WarningTest.kt b/app/src/androidTest/kotlin/com/tangem/tests/WarningTest.kt index 8bbaf0ed91..51bc278976 100644 --- a/app/src/androidTest/kotlin/com/tangem/tests/WarningTest.kt +++ b/app/src/androidTest/kotlin/com/tangem/tests/WarningTest.kt @@ -55,43 +55,4 @@ class WarningTest : BaseTestCase() { } } } - - @AllureId("227") - @DisplayName("Seed notify: check warning for wallet with seed phrase") - @Test - fun checkWarningForWalletWithSeedPhraseTest() { - val scenarioName = "seedphrase_notification" - val scenarioState = "Notified" - setupHooks( - additionalBeforeSection = { - step("Setup WireMock scenario '$scenarioName' for '$scenarioState' state") { - setWireMockScenarioState(scenarioName, scenarioState) - } - }, - additionalAfterSection = { - step("Reset WireMock scenario '$scenarioName' state") { - resetWireMockScenarioState(scenarioName) - } - } - ).run { - step("Open 'Main' screen") { - openMainScreen(mockContent = Wallet2WithSeedPhraseMockContent) - } - step("Assert 'Seed phrase' notification icon is displayed") { - onMainScreen { seedPhraseNotificationIcon.assertIsDisplayed() } - } - step("Assert 'Seed phrase' notification title is displayed") { - onMainScreen { seedPhraseNotificationTitle.assertIsDisplayed() } - } - step("Assert 'Seed phrase' notification message is displayed") { - onMainScreen { seedPhraseNotificationMessage.assertIsDisplayed() } - } - step("Assert notification 'Yes' button is displayed") { - onMainScreen { notificationYesButton.assertIsDisplayed() } - } - step("Assert notification 'No' button is displayed") { - onMainScreen { notificationNoButton.assertIsDisplayed() } - } - } - } } \ No newline at end of file diff --git a/app/src/main/java/com/tangem/tap/di/domain/WalletsDomainModule.kt b/app/src/main/java/com/tangem/tap/di/domain/WalletsDomainModule.kt index c63293cda2..04f3106b33 100644 --- a/app/src/main/java/com/tangem/tap/di/domain/WalletsDomainModule.kt +++ b/app/src/main/java/com/tangem/tap/di/domain/WalletsDomainModule.kt @@ -222,12 +222,6 @@ internal object WalletsDomainModule { ) } - @Provides - @Singleton - fun providesSeedPhraseNotificationUseCase(walletsRepository: WalletsRepository): SeedPhraseNotificationUseCase { - return SeedPhraseNotificationUseCase(walletsRepository = walletsRepository) - } - @Provides @Singleton fun provideGetCardImageUseCase(cardArtworksProvider: CardArtworksProvider): GetCardImageUseCase { diff --git a/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsRepository.kt b/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsRepository.kt index e2fac0c166..5a5278632e 100644 --- a/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsRepository.kt +++ b/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsRepository.kt @@ -12,11 +12,8 @@ import com.tangem.datasource.api.common.response.getOrThrow import com.tangem.datasource.api.common.response.isNetworkError import com.tangem.datasource.api.tangemTech.TangemTechApi import com.tangem.datasource.api.tangemTech.models.* -import com.tangem.datasource.api.tangemTech.models.SeedPhraseNotificationDTO.Status -import com.tangem.datasource.local.datastore.RuntimeStateStore import com.tangem.datasource.local.preferences.AppPreferencesStore import com.tangem.datasource.local.preferences.PreferencesKeys -import com.tangem.datasource.local.preferences.PreferencesKeys.SEED_FIRST_NOTIFICATION_SHOW_TIME import com.tangem.datasource.local.preferences.utils.getObjectMap import com.tangem.datasource.local.preferences.utils.getSyncOrDefault import com.tangem.datasource.local.preferences.utils.getSyncOrNull @@ -26,27 +23,20 @@ import com.tangem.domain.common.wallets.getSyncOrNull import com.tangem.domain.common.wallets.getSyncStrict import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.domain.wallets.models.SeedPhraseNotificationsStatus import com.tangem.domain.wallets.models.UserWalletRemoteInfo import com.tangem.domain.wallets.models.errors.ActivatePromoCodeError import com.tangem.domain.wallets.repository.WalletsRepository -import com.tangem.utils.WEEK_MILLIS import com.tangem.utils.coroutines.CoroutineDispatcherProvider -import com.tangem.utils.coroutines.runCatching import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.flow.* -import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -typealias SeedPhraseNotificationsStatuses = Map - @Suppress("TooManyFunctions", "LargeClass", "LongParameterList") internal class DefaultWalletsRepository( private val appPreferencesStore: AppPreferencesStore, private val tangemTechApi: TangemTechApi, private val userWalletsListRepository: UserWalletsListRepository, - private val seedPhraseNotificationVisibilityStore: RuntimeStateStore, private val dispatchers: CoroutineDispatcherProvider, private val walletServerBinder: WalletServerBinder, private val moshi: com.squareup.moshi.Moshi, @@ -128,148 +118,10 @@ internal class DefaultWalletsRepository( } } - override fun seedPhraseNotificationStatus(userWalletId: UserWalletId): Flow { - return channelFlow { - launch { - seedPhraseNotificationVisibilityStore.get() - .map { map -> - map.getOrDefault( - key = userWalletId, - defaultValue = SeedPhraseNotificationsStatus.NOT_NEEDED, - ) - } - .collectLatest(::send) - } - - fetchSeedPhraseNotificationStatus(userWalletId) - } - } - - private suspend fun fetchSeedPhraseNotificationStatus(userWalletId: UserWalletId) { - val userWallet = userWalletsListRepository.getSyncOrNull(id = userWalletId) - - if (userWallet != null && userWallet !is UserWallet.Cold) { - updateNotificationVisibility(id = userWalletId, value = SeedPhraseNotificationsStatus.NOT_NEEDED) - return - } - - val status = if (userWallet?.isImported == false) { - Status.NOT_NEEDED - } else { - runCatching(dispatchers.io) { - tangemTechApi.getSeedPhraseNotificationStatus(walletId = userWalletId.stringValue).getOrThrow() - }.fold( - onSuccess = { it.status }, - onFailure = { throwable -> - if (throwable is HttpException && throwable.code == HttpException.Code.NOT_FOUND) { - Status.NOTIFIED - } else { - Status.NOT_NEEDED - } - }, - ) - } - - when { - status == Status.NOTIFIED -> updateNotificationVisibility( - id = userWalletId, - value = SeedPhraseNotificationsStatus.SHOW_FIRST, - ) - status == Status.CONFIRMED && checkNeedFetchSecondNotification() -> - fetchSeedPhraseSecondNotificationStatus(userWalletId) - else -> updateNotificationVisibility(id = userWalletId, value = SeedPhraseNotificationsStatus.NOT_NEEDED) - } - } - - private suspend fun fetchSeedPhraseSecondNotificationStatus(userWalletId: UserWalletId) { - val status = runCatching(dispatchers.io) { - tangemTechApi.getSeedPhraseSecondNotificationStatus(walletId = userWalletId.stringValue).getOrThrow() - }.fold( - onSuccess = { it.status }, - onFailure = { Status.NOT_NEEDED }, - ) - - val showStatus = when (status) { - Status.CONFIRMED -> SeedPhraseNotificationsStatus.SHOW_SECOND - else -> SeedPhraseNotificationsStatus.NOT_NEEDED - } - - updateNotificationVisibility(id = userWalletId, value = showStatus) - } - - private suspend fun checkNeedFetchSecondNotification(): Boolean { - val firstNotificationTime = - appPreferencesStore.getSyncOrDefault(SEED_FIRST_NOTIFICATION_SHOW_TIME, default = 0L) - return System.currentTimeMillis() - firstNotificationTime > WEEK_MILLIS - } - - override suspend fun notifiedSeedPhraseNotification(userWalletId: UserWalletId) { - runCatching(dispatchers.io) { - tangemTechApi.updateSeedPhraseNotificationStatus( - walletId = userWalletId.stringValue, - body = SeedPhraseNotificationDTO(status = Status.NOTIFIED), - ).getOrThrow() - } - } - - override suspend fun confirmSeedPhraseNotification(userWalletId: UserWalletId) { - runCatching(dispatchers.io) { - tangemTechApi.updateSeedPhraseNotificationStatus( - walletId = userWalletId.stringValue, - body = SeedPhraseNotificationDTO(status = Status.CONFIRMED), - ).getOrThrow() - appPreferencesStore.store(key = SEED_FIRST_NOTIFICATION_SHOW_TIME, value = System.currentTimeMillis()) - } - - updateNotificationVisibility(id = userWalletId, value = SeedPhraseNotificationsStatus.NOT_NEEDED) - } - - override suspend fun declineSeedPhraseNotification(userWalletId: UserWalletId) { - runCatching(dispatchers.io) { - tangemTechApi.updateSeedPhraseNotificationStatus( - walletId = userWalletId.stringValue, - body = SeedPhraseNotificationDTO(status = Status.DECLINED), - ).getOrThrow() - appPreferencesStore.store(key = SEED_FIRST_NOTIFICATION_SHOW_TIME, value = System.currentTimeMillis()) - } - - updateNotificationVisibility(id = userWalletId, value = SeedPhraseNotificationsStatus.NOT_NEEDED) - } - override suspend fun createWallet(userWalletId: UserWalletId) { walletServerBinder.bind(userWalletId) } - override suspend fun rejectSeedPhraseSecondNotification(userWalletId: UserWalletId) { - runCatching(dispatchers.io) { - tangemTechApi.updateSeedPhraseSecondNotificationStatus( - walletId = userWalletId.stringValue, - body = SeedPhraseNotificationDTO(status = Status.REJECTED), - ).getOrThrow() - } - - updateNotificationVisibility(id = userWalletId, value = SeedPhraseNotificationsStatus.NOT_NEEDED) - } - - override suspend fun acceptSeedPhraseSecondNotification(userWalletId: UserWalletId) { - runCatching(dispatchers.io) { - tangemTechApi.updateSeedPhraseSecondNotificationStatus( - walletId = userWalletId.stringValue, - body = SeedPhraseNotificationDTO(status = Status.ACCEPTED), - ).getOrThrow() - } - - updateNotificationVisibility(id = userWalletId, value = SeedPhraseNotificationsStatus.NOT_NEEDED) - } - - private suspend fun updateNotificationVisibility(id: UserWalletId, value: SeedPhraseNotificationsStatus) { - return seedPhraseNotificationVisibilityStore.update { map -> - map.toMutableMap().apply { - this[id] = value - } - } - } - override fun nftEnabledStatus(userWalletId: UserWalletId): Flow = appPreferencesStore .getObjectMap(PreferencesKeys.WALLETS_NFT_ENABLED_STATES_KEY) .map { it[userWalletId.stringValue] == true } diff --git a/data/wallets/src/main/java/com/tangem/data/wallets/di/WalletsDataModule.kt b/data/wallets/src/main/java/com/tangem/data/wallets/di/WalletsDataModule.kt index c7561aab8b..1d57f16125 100644 --- a/data/wallets/src/main/java/com/tangem/data/wallets/di/WalletsDataModule.kt +++ b/data/wallets/src/main/java/com/tangem/data/wallets/di/WalletsDataModule.kt @@ -12,7 +12,6 @@ import com.tangem.data.wallets.hot.DefaultHotWalletAccessCodeAttemptsRepository import com.tangem.datasource.api.tangemTech.TangemTechApi import com.tangem.datasource.di.NetworkMoshi import com.tangem.datasource.local.appsflyer.AppsFlyerStore -import com.tangem.datasource.local.datastore.RuntimeStateStore import com.tangem.datasource.local.preferences.AppPreferencesStore import com.tangem.domain.common.wallets.UserWalletsListRepository import com.tangem.domain.wallets.derivations.ColdMapDerivationsRepository @@ -48,7 +47,6 @@ internal object WalletsDataModule { appPreferencesStore = appPreferencesStore, tangemTechApi = tangemTechApi, userWalletsListRepository = userWalletsListRepository, - seedPhraseNotificationVisibilityStore = RuntimeStateStore(defaultValue = emptyMap()), dispatchers = dispatchers, walletServerBinder = walletServerBinder, moshi = moshi, diff --git a/data/wallets/src/test/java/com/tangem/data/wallets/DefaultWalletsRepositoryTest.kt b/data/wallets/src/test/java/com/tangem/data/wallets/DefaultWalletsRepositoryTest.kt index 639b115e55..51046c6622 100644 --- a/data/wallets/src/test/java/com/tangem/data/wallets/DefaultWalletsRepositoryTest.kt +++ b/data/wallets/src/test/java/com/tangem/data/wallets/DefaultWalletsRepositoryTest.kt @@ -45,7 +45,6 @@ class DefaultWalletsRepositoryTest { appPreferencesStore = appPreferenceStore, tangemTechApi = tangemTechApi, userWalletsListRepository = mockk(), - seedPhraseNotificationVisibilityStore = mockk(), dispatchers = TestingCoroutineDispatcherProvider(), walletServerBinder = walletServerBinder, moshi = mockk(), diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/models/SeedPhraseNotificationsStatus.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/models/SeedPhraseNotificationsStatus.kt deleted file mode 100644 index 2c9180e6a6..0000000000 --- a/domain/wallets/src/main/java/com/tangem/domain/wallets/models/SeedPhraseNotificationsStatus.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.tangem.domain.wallets.models - -enum class SeedPhraseNotificationsStatus { - - SHOW_FIRST, - SHOW_SECOND, - NOT_NEEDED, -} \ No newline at end of file diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsRepository.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsRepository.kt index 06baab2842..2b25388b1e 100644 --- a/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsRepository.kt +++ b/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsRepository.kt @@ -3,7 +3,6 @@ package com.tangem.domain.wallets.repository import arrow.core.Either import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.domain.wallets.models.SeedPhraseNotificationsStatus import com.tangem.domain.wallets.models.UserWalletRemoteInfo import com.tangem.domain.wallets.models.errors.ActivatePromoCodeError import kotlinx.coroutines.flow.Flow @@ -23,18 +22,6 @@ interface WalletsRepository { suspend fun setHasWalletsWithRing(userWalletId: UserWalletId) - fun seedPhraseNotificationStatus(userWalletId: UserWalletId): Flow - - suspend fun notifiedSeedPhraseNotification(userWalletId: UserWalletId) - - suspend fun confirmSeedPhraseNotification(userWalletId: UserWalletId) - - suspend fun declineSeedPhraseNotification(userWalletId: UserWalletId) - - suspend fun rejectSeedPhraseSecondNotification(userWalletId: UserWalletId) - - suspend fun acceptSeedPhraseSecondNotification(userWalletId: UserWalletId) - suspend fun createWallet(userWalletId: UserWalletId) fun nftEnabledStatus(userWalletId: UserWalletId): Flow diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/SeedPhraseNotificationUseCase.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/SeedPhraseNotificationUseCase.kt deleted file mode 100644 index 12326b4ac6..0000000000 --- a/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/SeedPhraseNotificationUseCase.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.tangem.domain.wallets.usecase - -import com.tangem.domain.wallets.models.SeedPhraseNotificationsStatus -import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.domain.wallets.repository.WalletsRepository -import kotlinx.coroutines.flow.Flow - -class SeedPhraseNotificationUseCase( - private val walletsRepository: WalletsRepository, -) { - - operator fun invoke(userWalletId: UserWalletId): Flow { - return walletsRepository.seedPhraseNotificationStatus(userWalletId) - } - - suspend fun notified(userWalletId: UserWalletId) { - walletsRepository.notifiedSeedPhraseNotification(userWalletId) - } - - suspend fun confirm(userWalletId: UserWalletId) { - walletsRepository.confirmSeedPhraseNotification(userWalletId) - } - - suspend fun decline(userWalletId: UserWalletId) { - walletsRepository.declineSeedPhraseNotification(userWalletId) - } - - suspend fun acceptSecond(userWalletId: UserWalletId) { - walletsRepository.acceptSeedPhraseSecondNotification(userWalletId) - } - - suspend fun rejectSecond(userWalletId: UserWalletId) { - walletsRepository.rejectSeedPhraseSecondNotification(userWalletId) - } -} \ No newline at end of file diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/intents/WalletWarningsClickIntents.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/intents/WalletWarningsClickIntents.kt index 5d86ed9512..ee38dd19e0 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/intents/WalletWarningsClickIntents.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/intents/WalletWarningsClickIntents.kt @@ -2,7 +2,6 @@ package com.tangem.feature.wallet.child.wallet.model.intents import arrow.core.getOrElse import com.tangem.utils.logging.TangemLogger -import com.tangem.common.TangemBlogUrlBuilder import com.tangem.common.routing.AppRoute.* import com.tangem.common.routing.AppRouter import com.tangem.common.ui.notifications.NotificationId @@ -45,7 +44,6 @@ import com.tangem.feature.wallet.presentation.wallet.analytics.WalletScreenAnaly import com.tangem.feature.wallet.presentation.wallet.analytics.WalletScreenAnalyticsEvent.Basic import com.tangem.feature.wallet.presentation.wallet.analytics.WalletScreenAnalyticsEvent.MainScreen import com.tangem.feature.wallet.presentation.wallet.state.WalletStateController -import com.tangem.feature.wallet.presentation.wallet.state.model.WalletAlertUM import com.tangem.feature.wallet.presentation.wallet.state.model.WalletEvent import com.tangem.feature.wallet.presentation.wallet.state.utils.WalletEventSender import com.tangem.features.pushnotifications.api.analytics.PushNotificationAnalyticEvents @@ -85,14 +83,6 @@ internal interface WalletWarningsClickIntents { fun onNoteMigrationButtonClick(url: String) - fun onSeedPhraseNotificationConfirm() - - fun onSeedPhraseNotificationDecline() - - fun onSeedPhraseSecondNotificationAccept() - - fun onSeedPhraseSecondNotificationReject() - fun onAllowPermissions() fun onDenyPermissions() @@ -122,7 +112,6 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor( private val shouldShowPromoWalletUseCase: ShouldShowPromoWalletUseCase, private val getWalletMetaInfoUseCase: GetWalletMetaInfoUseCase, private val sendFeedbackEmailUseCase: SendFeedbackEmailUseCase, - private val seedPhraseNotificationUseCase: SeedPhraseNotificationUseCase, private val urlOpener: UrlOpener, private val multiNetworkStatusFetcher: MultiNetworkStatusFetcher, private val multiQuoteStatusFetcher: MultiQuoteStatusFetcher, @@ -360,66 +349,6 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor( } } - override fun onSeedPhraseNotificationConfirm() { - val userWallet = getSelectedUserWallet() ?: return - - analyticsEventHandler.send(MainScreen.NoticeSeedPhraseSupportButtonYes()) - - uiMessageSender.send( - WalletAlertUM.seedPhraseConfirm { - modelScope.launch { - seedPhraseNotificationUseCase.confirm(userWalletId = userWallet.walletId) - - urlOpener.openUrl( - url = TangemBlogUrlBuilder.build(post = TangemBlogUrlBuilder.Post.SeedNotify), - ) - } - }, - ) - } - - override fun onSeedPhraseNotificationDecline() { - val userWallet = getSelectedUserWallet() ?: return - - analyticsEventHandler.send(MainScreen.NoticeSeedPhraseSupportButtonNo()) - - uiMessageSender.send( - WalletAlertUM.seedPhraseDismiss { - modelScope.launch { - seedPhraseNotificationUseCase.decline(userWalletId = userWallet.walletId) - } - }, - ) - } - - override fun onSeedPhraseSecondNotificationAccept() { - val userWallet = getSelectedUserWallet() ?: return - - analyticsEventHandler.send(MainScreen.NoticeSeedPhraseSupportButtonUsed()) - - uiMessageSender.send( - WalletAlertUM.seedPhraseConfirm { - modelScope.launch { - seedPhraseNotificationUseCase.acceptSecond(userWalletId = userWallet.walletId) - - urlOpener.openUrl( - url = TangemBlogUrlBuilder.build(post = TangemBlogUrlBuilder.Post.SeedNotifySecond), - ) - } - }, - ) - } - - override fun onSeedPhraseSecondNotificationReject() { - val userWallet = getSelectedUserWallet() ?: return - - analyticsEventHandler.send(MainScreen.NoticeSeedPhraseSupportButtonDeclined()) - - modelScope.launch { - seedPhraseNotificationUseCase.rejectSecond(userWalletId = userWallet.walletId) - } - } - override fun onFinishWalletActivationClick(isBackupExists: Boolean) { analyticsEventHandler.send(MainScreen.ButtonFinalizeActivation()) val userWalletId = stateHolder.getSelectedWalletId() diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/WalletScreenAnalyticsEvent.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/WalletScreenAnalyticsEvent.kt index 71ae06f02a..5040a3728d 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/WalletScreenAnalyticsEvent.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/WalletScreenAnalyticsEvent.kt @@ -155,18 +155,6 @@ sealed class WalletScreenAnalyticsEvent { class DeleteWalletTapped : MainScreen(event = "Button - Delete Wallet Tapped") - class NoticeSeedPhraseSupport : MainScreen(event = "Notice - Seed Phrase Support") - - class NoticeSeedPhraseSupportSecond : MainScreen(event = "Notice - Seed Phrase Support2") - - class NoticeSeedPhraseSupportButtonNo : MainScreen(event = "Button - Support No") - - class NoticeSeedPhraseSupportButtonYes : MainScreen(event = "Button - Support Yes") - - class NoticeSeedPhraseSupportButtonUsed : MainScreen(event = "Button - Support Used") - - class NoticeSeedPhraseSupportButtonDeclined : MainScreen(event = "Button - Support Declined") - class NoticeUnrecognizedQr : MainScreen( event = "Notice - Unrecognized QR", ) diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsAnalyticsSender.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsAnalyticsSender.kt index 09f8eba96e..32b3a72da1 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsAnalyticsSender.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsAnalyticsSender.kt @@ -116,8 +116,6 @@ internal class WalletWarningsAnalyticsSender @Inject constructor( balanceState = balanceState, ) } - is WalletNotification.Critical.SeedPhraseNotification -> NoticeSeedPhraseSupport() - is WalletNotification.Critical.SeedPhraseSecondNotification -> NoticeSeedPhraseSupportSecond() is WalletNotification.PushNotifications -> PushBanner() is WalletNotification.Warning.TangemPayRefreshNeeded -> null is WalletNotification.Warning.TangemPayUnreachable -> null @@ -163,8 +161,6 @@ internal class WalletWarningsAnalyticsSender @Inject constructor( balanceState = balanceState, ) } - is WalletNotificationUM.SeedPhraseNotification -> NoticeSeedPhraseSupport() - is WalletNotificationUM.SeedPhraseSecondNotification -> NoticeSeedPhraseSupportSecond() is WalletNotificationUM.PushNotifications -> PushBanner() is WalletNotificationUM.UnlockWallets, is WalletNotificationUM.NoAccount, diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsSingleEventSender.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsSingleEventSender.kt index ee14b94350..2a7b1a0a47 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsSingleEventSender.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsSingleEventSender.kt @@ -11,7 +11,6 @@ import com.tangem.core.ui.message.bottomSheetMessage import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.models.wallet.UserWalletId import com.tangem.domain.wallets.usecase.GetUserWalletUseCase -import com.tangem.domain.wallets.usecase.SeedPhraseNotificationUseCase import com.tangem.feature.wallet.child.wallet.model.WalletActivationBannerType import com.tangem.feature.wallet.impl.R import com.tangem.feature.wallet.presentation.wallet.state.model.WalletNotification @@ -24,7 +23,6 @@ import javax.inject.Inject @ModelScoped internal class WalletWarningsSingleEventSender @Inject constructor( - private val seedPhraseNotificationUseCase: SeedPhraseNotificationUseCase, private val screenLifecycleProvider: ScreenLifecycleProvider, private val uiMessageSender: UiMessageSender, private val getUserWalletUseCase: GetUserWalletUseCase, @@ -32,11 +30,7 @@ internal class WalletWarningsSingleEventSender @Inject constructor( ) { private val isActivationBottomSheetShown: ConcurrentHashMap = ConcurrentHashMap() - suspend fun send( - userWalletId: UserWalletId, - displayedUiState: WalletState?, - newWarnings: List, - ) { + fun send(userWalletId: UserWalletId, displayedUiState: WalletState?, newWarnings: List) { if (screenLifecycleProvider.isBackgroundState.value) return if (newWarnings.isEmpty()) return if (displayedUiState == null || displayedUiState.pullToRefreshConfig.isRefreshing) return @@ -51,9 +45,6 @@ internal class WalletWarningsSingleEventSender @Inject constructor( events.forEach { event -> when (event) { - is WalletNotification.Critical.SeedPhraseNotification -> { - seedPhraseNotificationUseCase.notified(userWalletId = userWalletId) - } is WalletNotification.FinishWalletActivation -> { // We check that map contains the first seen wallet (will return null instead false/true otherwise) // and for this wallet we haven't shown the activation bs yet (check that returns false, not true) @@ -69,11 +60,7 @@ internal class WalletWarningsSingleEventSender @Inject constructor( } } - suspend fun send( - userWalletId: UserWalletId, - displayedWalletUM: WalletUM?, - newNotifications: List, - ) { + fun send(userWalletId: UserWalletId, displayedWalletUM: WalletUM?, newNotifications: List) { if (screenLifecycleProvider.isBackgroundState.value) return if (newNotifications.isEmpty()) return if (displayedWalletUM == null || displayedWalletUM.pullToRefreshConfig.isRefreshing) return @@ -89,9 +76,6 @@ internal class WalletWarningsSingleEventSender @Inject constructor( events.forEach { event -> when (event) { - is WalletNotificationUM.SeedPhraseNotification -> { - seedPhraseNotificationUseCase.notified(userWalletId = userWalletId) - } is WalletNotificationUM.FinishWalletActivation -> { // We check that map contains the first seen wallet (will return null instead false/true otherwise) // and for this wallet we haven't shown the activation bs yet (check that returns false, not true) diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetMultiWalletWarningsFactory.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetMultiWalletWarningsFactory.kt index e81d00263d..fd7ada0172 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetMultiWalletWarningsFactory.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetMultiWalletWarningsFactory.kt @@ -27,9 +27,7 @@ import com.tangem.domain.notifications.repository.NotificationsRepository import com.tangem.domain.promo.ShouldShowPromoWalletUseCase import com.tangem.domain.promo.models.PromoId import com.tangem.domain.settings.IsReadyToShowRateAppUseCase -import com.tangem.domain.wallets.models.SeedPhraseNotificationsStatus import com.tangem.domain.wallets.usecase.IsNeedToBackupUseCase -import com.tangem.domain.wallets.usecase.SeedPhraseNotificationUseCase import com.tangem.feature.wallet.child.wallet.model.WalletActivationBannerType import com.tangem.feature.wallet.child.wallet.model.intents.WalletClickIntents import com.tangem.feature.wallet.impl.R @@ -56,7 +54,6 @@ internal class GetMultiWalletWarningsFactory @Inject constructor( private val isReadyToShowRateAppUseCase: IsReadyToShowRateAppUseCase, private val isNeedToBackupUseCase: IsNeedToBackupUseCase, private val backupValidator: BackupValidator, - private val seedPhraseNotificationUseCase: SeedPhraseNotificationUseCase, private val shouldShowPromoWalletUseCase: ShouldShowPromoWalletUseCase, private val notificationsRepository: NotificationsRepository, private val accountDependencies: AccountDependencies, @@ -76,7 +73,6 @@ internal class GetMultiWalletWarningsFactory @Inject constructor( accountStatusListFlow, isReadyToShowRateAppUseCase().distinctUntilChanged(), isNeedToBackupUseCase(userWallet.walletId).distinctUntilChanged(), - seedPhraseNotificationUseCase(userWalletId = userWallet.walletId).distinctUntilChanged(), shouldShowPromoWalletUseCase(userWalletId = userWallet.walletId, promoId = PromoId.OnePlusOne) .distinctUntilChanged(), notificationsRepository.getShouldShowNotification(NotificationId.EnablePushesReminderNotification.key) @@ -93,13 +89,12 @@ internal class GetMultiWalletWarningsFactory @Inject constructor( val accountStatusList = array[0] as AccountStatusList val isReadyToShowRating = array[1] as Boolean val isNeedToBackup = array[2] as Boolean - val seedPhraseIssueStatus = array[3] as SeedPhraseNotificationsStatus - val shouldShowOnePlusOnePromo = array[4] as Boolean - val shouldShowEnablePushesReminderNotification = array[5] as Boolean - val shouldAccessCodeSkipped = array[6] as Boolean - val shouldShowYieldPromo = array[7] as Boolean - val shouldShowUpgradeBanner = array[8] as Boolean - val closureTimestamp = array[9] as? Long + val shouldShowOnePlusOnePromo = array[3] as Boolean + val shouldShowEnablePushesReminderNotification = array[4] as Boolean + val shouldAccessCodeSkipped = array[5] as Boolean + val shouldShowYieldPromo = array[6] as Boolean + val shouldShowUpgradeBanner = array[7] as Boolean + val closureTimestamp = array[8] as? Long val flattenCurrencies = accountStatusList.flattenCurrencies() val paymentAccountStatus = accountStatusList.accountStatuses @@ -109,7 +104,7 @@ internal class GetMultiWalletWarningsFactory @Inject constructor( buildList { addUsedOutdatedDataNotification(accountStatusList.totalFiatBalance) - addCriticalNotifications(userWallet, seedPhraseIssueStatus, clickIntents) + addCriticalNotifications(userWallet, clickIntents) addUpgradeHotWalletPromoNotification( userWallet = userWallet, @@ -213,15 +208,12 @@ internal class GetMultiWalletWarningsFactory @Inject constructor( private fun MutableList.addCriticalNotifications( userWallet: UserWallet, - seedPhraseIssueStatus: SeedPhraseNotificationsStatus, clickIntents: WalletClickIntents, ) { if (userWallet !is UserWallet.Cold) { return } - addSeedNotificationIfNeeded(userWallet, seedPhraseIssueStatus, clickIntents) - val cardTypesResolver = userWallet.scanResponse.cardTypesResolver addIf( element = WalletNotification.Critical.BackupError { clickIntents.onBackupErrorClick() }, @@ -246,39 +238,6 @@ internal class GetMultiWalletWarningsFactory @Inject constructor( } } - private fun MutableList.addSeedNotificationIfNeeded( - userWallet: UserWallet.Cold, - seedPhraseIssueStatus: SeedPhraseNotificationsStatus, - clickIntents: WalletClickIntents, - ) { - val isNotificationAvailable = with(userWallet) { - val isDemo = isDemoCardUseCase(cardId = userWallet.cardId) - val isWalletWithSeedPhrase = scanResponse.cardTypesResolver.isWallet2() && userWallet.isImported - - !isDemo && isWalletWithSeedPhrase - } - - when (seedPhraseIssueStatus) { - SeedPhraseNotificationsStatus.SHOW_FIRST -> addIf( - element = WalletNotification.Critical.SeedPhraseNotification( - onDeclineClick = clickIntents::onSeedPhraseNotificationDecline, - onConfirmClick = clickIntents::onSeedPhraseNotificationConfirm, - ), - condition = isNotificationAvailable, - ) - SeedPhraseNotificationsStatus.SHOW_SECOND -> addIf( - element = WalletNotification.Critical.SeedPhraseSecondNotification( - onDeclineClick = clickIntents::onSeedPhraseSecondNotificationReject, - onConfirmClick = clickIntents::onSeedPhraseSecondNotificationAccept, - ), - condition = isNotificationAvailable, - ) - SeedPhraseNotificationsStatus.NOT_NEEDED -> { - // do nothing - } - } - } - private fun MutableList.addInformationalNotifications( userWallet: UserWallet, cardTypesResolver: CardTypesResolver?, diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetWalletNotificationsFactory.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetWalletNotificationsFactory.kt index 8735cf42f4..51f3323547 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetWalletNotificationsFactory.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/GetWalletNotificationsFactory.kt @@ -14,9 +14,7 @@ import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.models.wallet.isMultiCurrency -import com.tangem.domain.wallets.models.SeedPhraseNotificationsStatus import com.tangem.domain.wallets.usecase.IsNeedToBackupUseCase -import com.tangem.domain.wallets.usecase.SeedPhraseNotificationUseCase import com.tangem.feature.wallet.child.wallet.model.intents.WalletClickIntents import com.tangem.feature.wallet.presentation.account.AccountDependencies import com.tangem.feature.wallet.presentation.wallet.state.model.WalletNotificationUM @@ -40,7 +38,6 @@ internal class GetWalletNotificationsFactory @Inject constructor( private val isDemoCardUseCase: IsDemoCardUseCase, private val isNeedToBackupUseCase: IsNeedToBackupUseCase, private val backupValidator: BackupValidator, - private val seedPhraseNotificationUseCase: SeedPhraseNotificationUseCase, private val accountDependencies: AccountDependencies, private val getAccessCodeSkippedUseCase: GetAccessCodeSkippedUseCase, private val hasSingleWalletSignedHashesUseCase: HasSingleWalletSignedHashesUseCase, @@ -54,16 +51,15 @@ internal class GetWalletNotificationsFactory @Inject constructor( return combine( flow = accountStatusListFlow, flow2 = isNeedToBackupUseCase(userWallet.walletId).distinctUntilChanged(), - flow3 = seedPhraseNotificationUseCase(userWalletId = userWallet.walletId).distinctUntilChanged(), - flow4 = getAccessCodeSkippedUseCase(userWallet.walletId).distinctUntilChanged(), - ) { accountList, isNeedToBackup, seedPhraseIssueStatus, shouldAccessCodeSkipped -> + flow3 = getAccessCodeSkippedUseCase(userWallet.walletId).distinctUntilChanged(), + ) { accountList, isNeedToBackup, shouldAccessCodeSkipped -> val totalFiatBalance = accountList.totalFiatBalance val flattenCurrencies = accountList.flattenCurrencies() buildList { addUsedOutdatedDataNotification(totalFiatBalance) - addCriticalNotifications(userWallet, seedPhraseIssueStatus, clickIntents) + addCriticalNotifications(userWallet, clickIntents) addFinishWalletActivationNotification( userWallet = userWallet, @@ -99,15 +95,12 @@ internal class GetWalletNotificationsFactory @Inject constructor( private fun MutableList.addCriticalNotifications( userWallet: UserWallet, - seedPhraseIssueStatus: SeedPhraseNotificationsStatus, clickIntents: WalletClickIntents, ) { if (userWallet !is UserWallet.Cold) { return } - addSeedNotificationIfNeeded(userWallet, seedPhraseIssueStatus, clickIntents) - val cardTypesResolver = userWallet.scanResponse.cardTypesResolver addIf( element = WalletNotificationUM.BackupError { clickIntents.onSupportClick() }, @@ -279,37 +272,6 @@ internal class GetWalletNotificationsFactory @Inject constructor( ) } - private fun MutableList.addSeedNotificationIfNeeded( - userWallet: UserWallet.Cold, - seedPhraseIssueStatus: SeedPhraseNotificationsStatus, - clickIntents: WalletClickIntents, - ) { - val isNotificationAvailable = with(userWallet) { - val isDemo = isDemoCardUseCase(cardId = userWallet.cardId) - val isWalletWithSeedPhrase = scanResponse.cardTypesResolver.isWallet2() && userWallet.isImported - - !isDemo && isWalletWithSeedPhrase - } - - when (seedPhraseIssueStatus) { - SeedPhraseNotificationsStatus.SHOW_FIRST -> addIf( - element = WalletNotificationUM.SeedPhraseNotification( - onDeclineClick = clickIntents::onSeedPhraseNotificationDecline, - onConfirmClick = clickIntents::onSeedPhraseNotificationConfirm, - ), - condition = isNotificationAvailable, - ) - SeedPhraseNotificationsStatus.SHOW_SECOND -> addIf( - element = WalletNotificationUM.SeedPhraseSecondNotification( - onDeclineClick = clickIntents::onSeedPhraseSecondNotificationReject, - onConfirmClick = clickIntents::onSeedPhraseSecondNotificationAccept, - ), - condition = isNotificationAvailable, - ) - SeedPhraseNotificationsStatus.NOT_NEEDED -> Unit - } - } - private suspend fun hasSignedHashes( selectedWallet: UserWallet, cryptoCurrencyStatus: CryptoCurrencyStatus?, diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletAlertUM.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletAlertUM.kt index 665fcfdafd..c63587fb17 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletAlertUM.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletAlertUM.kt @@ -9,24 +9,6 @@ import com.tangem.feature.wallet.impl.R internal object WalletAlertUM { - fun seedPhraseConfirm(onClick: () -> Unit): DialogMessage { - return DialogMessage( - message = resourceReference(R.string.warning_seedphrase_issue_answer_yes), - firstActionBuilder = { - okAction(onClick = onClick) - }, - ) - } - - fun seedPhraseDismiss(onClick: () -> Unit): DialogMessage { - return DialogMessage( - message = resourceReference(R.string.warning_seedphrase_issue_answer_no), - firstActionBuilder = { - okAction(onClick = onClick) - }, - ) - } - fun unableHideToken(cryptoCurrency: CryptoCurrency): DialogMessage { return DialogMessage( title = resourceReference( diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotification.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotification.kt index 77f9417e93..c960e5ba67 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotification.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotification.kt @@ -55,34 +55,6 @@ sealed class WalletNotification(val config: NotificationConfig) { onClick = onSupportClick, ), ) - - data class SeedPhraseNotification( - val onDeclineClick: () -> Unit, - val onConfirmClick: () -> Unit, - ) : Critical( - title = resourceReference(R.string.warning_seedphrase_issue_title), - subtitle = resourceReference(R.string.warning_seedphrase_issue_message), - buttonsState = NotificationConfig.ButtonsState.SecondaryPairButtonsConfig( - leftText = resourceReference(R.string.common_no), - onLeftClick = onDeclineClick, - rightText = resourceReference(R.string.common_yes), - onRightClick = onConfirmClick, - ), - ) - - data class SeedPhraseSecondNotification( - val onDeclineClick: () -> Unit, - val onConfirmClick: () -> Unit, - ) : Critical( - title = resourceReference(R.string.warning_seedphrase_action_required_title), - subtitle = resourceReference(R.string.warning_seedphrase_contacted_support), - buttonsState = NotificationConfig.ButtonsState.SecondaryPairButtonsConfig( - leftText = resourceReference(R.string.seed_warning_no), - onLeftClick = onDeclineClick, - rightText = resourceReference(R.string.seed_warning_yes), - onRightClick = onConfirmClick, - ), - ) } sealed class Warning( diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotificationUM.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotificationUM.kt index f0c7a36808..f3644ec928 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotificationUM.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotificationUM.kt @@ -143,64 +143,6 @@ internal sealed class WalletNotificationUM(val messageUM: TangemMessageUM, val t type = WalletNotificationType.Critical, ) - data class SeedPhraseNotification( - val onDeclineClick: () -> Unit, - val onConfirmClick: () -> Unit, - ) : WalletNotificationUM( - messageUM = TangemMessageUM( - id = "SeedPhraseIssueNotification", - title = resourceReference(id = R.string.warning_seedphrase_issue_title), - subtitle = resourceReference(id = R.string.warning_seedphrase_issue_message), - messageEffect = TangemMessageEffect.Warning, - buttonsUM = persistentListOf( - TangemMessageButtonUM( - text = resourceReference(id = R.string.common_no), - type = TangemButtonType.PrimaryInverse, - onClick = onDeclineClick, - ), - TangemMessageButtonUM( - text = resourceReference(id = R.string.common_yes), - type = TangemButtonType.PrimaryInverse, - onClick = onConfirmClick, - ), - ), - iconUM = TangemIconUM.Icon( - iconRes = R.drawable.ic_attention_default_24, - tintReference = { TangemTheme.colors2.graphic.neutral.primary }, - ), - ), - type = WalletNotificationType.Critical, - ) - - data class SeedPhraseSecondNotification( - val onDeclineClick: () -> Unit, - val onConfirmClick: () -> Unit, - ) : WalletNotificationUM( - messageUM = TangemMessageUM( - id = "SeedPhraseSecondIssueNotification", - title = resourceReference(id = R.string.warning_seedphrase_action_required_title), - subtitle = resourceReference(id = R.string.warning_seedphrase_contacted_support), - messageEffect = TangemMessageEffect.Warning, - iconUM = TangemIconUM.Icon( - iconRes = R.drawable.ic_attention_default_24, - tintReference = { TangemTheme.colors2.graphic.neutral.primary }, - ), - buttonsUM = persistentListOf( - TangemMessageButtonUM( - text = resourceReference(id = R.string.seed_warning_no), - type = TangemButtonType.PrimaryInverse, - onClick = onDeclineClick, - ), - TangemMessageButtonUM( - text = resourceReference(id = R.string.seed_warning_yes), - type = TangemButtonType.PrimaryInverse, - onClick = onConfirmClick, - ), - ), - ), - type = WalletNotificationType.Critical, - ) - data class MissingBackup(val onClick: () -> Unit) : WalletNotificationUM( messageUM = TangemMessageUM( id = "MissingBackupNotification",