From 4faf6e9cb06e185b96146a7e5cc4a55ae211914d Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 29 Jun 2026 16:03:17 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../kotlin/com/tangem/common/BaseTestCase.kt | 1 - .../configs/feature_toggles_config.json | 4 ---- .../FeatureTogglesNamingConventionTest.kt | 1 - .../featuretoggles/WalletFeatureToggles.kt | 2 -- .../intents/WalletContentClickIntents.kt | 10 ++-------- .../DefaultWalletFeatureToggles.kt | 3 --- .../transformers/SetTokenListTransformer.kt | 3 --- .../converter/TokenListStateConverter.kt | 17 +++-------------- .../converter/WalletTokensListUMConverter.kt | 13 ++----------- .../subscribers/AccountListSubscriber.kt | 5 ----- .../subscribers/BasicAccountListSubscriber.kt | 3 --- .../subscribers/SingleWalletSubscriber.kt | 5 ----- .../SingleWalletWithTokenSubscriberLegacy.kt | 5 ----- .../SetTokenListTransformerTest.kt | 1 - .../WalletContentClickIntentsAnalyticsTest.kt | 19 +------------------ 15 files changed, 8 insertions(+), 84 deletions(-) diff --git a/app/src/androidTest/kotlin/com/tangem/common/BaseTestCase.kt b/app/src/androidTest/kotlin/com/tangem/common/BaseTestCase.kt index 6399061197..680df9eddc 100644 --- a/app/src/androidTest/kotlin/com/tangem/common/BaseTestCase.kt +++ b/app/src/androidTest/kotlin/com/tangem/common/BaseTestCase.kt @@ -185,7 +185,6 @@ abstract class BaseTestCase : TestCase( "SWAP_REDESIGN_ENABLED" to false, "ACCOUNTS_FEATURE_ENABLED" to true, "MAIN_SCREEN_QR_SCANNING_ENABLED" to true, - "ADD_AND_MANAGE_TOKENS_ENABLED" to true, "ASSETS_DISCOVERY_ENABLED" to true, "VISA_ONBOARDING_ENABLED" to true, // Version-gated toggles released in versions <= 6.0 — forced on so tests run against the actual diff --git a/core/config-toggles/src/main/assets/configs/feature_toggles_config.json b/core/config-toggles/src/main/assets/configs/feature_toggles_config.json index 021df0f6f5..10c1e5776d 100644 --- a/core/config-toggles/src/main/assets/configs/feature_toggles_config.json +++ b/core/config-toggles/src/main/assets/configs/feature_toggles_config.json @@ -47,10 +47,6 @@ "name": "HEDERA_ERC20_ENABLED", "version": "5.37" }, - { - "name": "ADD_AND_MANAGE_TOKENS_ENABLED", - "version": "5.38" - }, { "name": "WALLET_CONNECT_BITCOIN_ENABLED", "version": "undefined" diff --git a/core/config-toggles/src/test/kotlin/com/tangem/core/configtoggle/feature/FeatureTogglesNamingConventionTest.kt b/core/config-toggles/src/test/kotlin/com/tangem/core/configtoggle/feature/FeatureTogglesNamingConventionTest.kt index 006cba99d2..27482ab781 100644 --- a/core/config-toggles/src/test/kotlin/com/tangem/core/configtoggle/feature/FeatureTogglesNamingConventionTest.kt +++ b/core/config-toggles/src/test/kotlin/com/tangem/core/configtoggle/feature/FeatureTogglesNamingConventionTest.kt @@ -39,7 +39,6 @@ internal class FeatureTogglesNamingConventionTest { /** Toggles created before the AND_/TWI_ naming convention. Do NOT add new entries. */ val EXCLUDED_TOGGLES_LIST = setOf( "ADDRESS_SYNC_ENABLED", - "ADD_AND_MANAGE_TOKENS_ENABLED", "APP_REDESIGN_ENABLED", "ASSETS_DISCOVERY_ENABLED", "DYNAMIC_ADDRESSES_ENABLED", diff --git a/features/wallet/api/src/main/kotlin/com/tangem/features/wallet/featuretoggles/WalletFeatureToggles.kt b/features/wallet/api/src/main/kotlin/com/tangem/features/wallet/featuretoggles/WalletFeatureToggles.kt index d61d46ab1f..e736c3833e 100644 --- a/features/wallet/api/src/main/kotlin/com/tangem/features/wallet/featuretoggles/WalletFeatureToggles.kt +++ b/features/wallet/api/src/main/kotlin/com/tangem/features/wallet/featuretoggles/WalletFeatureToggles.kt @@ -7,8 +7,6 @@ package com.tangem.features.wallet.featuretoggles */ interface WalletFeatureToggles { - val isAddAndManageTokensEnabled: Boolean - val isAddFundsStage1Enabled: Boolean val isManageFundsEnabled: Boolean diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/intents/WalletContentClickIntents.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/intents/WalletContentClickIntents.kt index 0e34ecf2d4..e0b657e86e 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/intents/WalletContentClickIntents.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/intents/WalletContentClickIntents.kt @@ -37,7 +37,6 @@ import com.tangem.feature.wallet.presentation.wallet.state.transformers.CloseBot import com.tangem.feature.wallet.presentation.wallet.state.transformers.OpenBottomSheetTransformer import com.tangem.feature.wallet.presentation.wallet.state.transformers.converter.MultiWalletCurrencyActionsConverter import com.tangem.feature.wallet.presentation.wallet.state.utils.WalletEventSender -import com.tangem.features.wallet.featuretoggles.WalletFeatureToggles import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.collections.immutable.toPersistentList import kotlinx.coroutines.flow.collectLatest @@ -114,7 +113,6 @@ internal class WalletContentClickIntentsImplementor @Inject constructor( private val yieldSupplySetShouldShowMainPromoUseCase: YieldSupplySetShouldShowMainPromoUseCase, private val tokenListAnalyticsSender: TokenListAnalyticsSender, private val uiMessageSender: UiMessageSender, - private val walletFeatureToggles: WalletFeatureToggles, ) : BaseWalletClickIntents(), WalletContentClickIntents { override fun onDetailsClick() { @@ -123,12 +121,8 @@ internal class WalletContentClickIntentsImplementor @Inject constructor( override fun onOrganizeTokensClick() { val userWalletId = stateHolder.getSelectedWalletId() - if (walletFeatureToggles.isAddAndManageTokensEnabled) { - analyticsEventHandler.send(PortfolioAnalyticsEvent.ButtonAddManage()) - router.openAddAndManageBottomSheet(userWalletId = userWalletId) - } else { - router.openOrganizeTokensScreen(userWalletId = userWalletId) - } + analyticsEventHandler.send(PortfolioAnalyticsEvent.ButtonAddManage()) + router.openAddAndManageBottomSheet(userWalletId = userWalletId) } override fun onDismissMarketsTooltip() { diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/featuretoggles/DefaultWalletFeatureToggles.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/featuretoggles/DefaultWalletFeatureToggles.kt index d465ad74b7..436dc1f2f9 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/featuretoggles/DefaultWalletFeatureToggles.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/featuretoggles/DefaultWalletFeatureToggles.kt @@ -9,9 +9,6 @@ internal class DefaultWalletFeatureToggles @Inject constructor( private val featureToggles: FeatureTogglesManager, ) : WalletFeatureToggles { - override val isAddAndManageTokensEnabled: Boolean - get() = featureToggles.isFeatureEnabled(FeatureToggles.ADD_AND_MANAGE_TOKENS_ENABLED) - override val isAddFundsStage1Enabled: Boolean get() = featureToggles.isFeatureEnabled(FeatureToggles.AND_15310_ADD_FUNDS_STAGE1) diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTokenListTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTokenListTransformer.kt index 4d436e83be..9baaa325c1 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTokenListTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTokenListTransformer.kt @@ -27,7 +27,6 @@ internal class SetTokenListTransformer( private val shouldShowMainPromo: Boolean, private val isAccountsModeEnabled: Boolean, private val isRedesignEnabled: Boolean, - private val isAddAndManageTokensEnabled: Boolean, private val isMultipleCardsEnabled: Boolean, ) : WalletStateTransformer(userWallet.walletId) { @@ -123,7 +122,6 @@ internal class SetTokenListTransformer( yieldModuleApyMap = yieldSupplyApyMap, stakingAvailabilityMap = stakingAvailabilityMap, shouldShowMainPromo = shouldShowMainPromo, - isAddAndManageTokensEnabled = isAddAndManageTokensEnabled, ).convert(value = this) } @@ -167,7 +165,6 @@ internal class SetTokenListTransformer( shouldShowMainPromo = shouldShowMainPromo, isAccountsModeEnabled = isAccountsModeEnabled, expandedAccounts = params.expandedAccounts, - isAddAndManageTokensEnabled = isAddAndManageTokensEnabled, ).convert(value = params.accountList) } } \ No newline at end of file diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/TokenListStateConverter.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/TokenListStateConverter.kt index 7eb8860cc4..c33ce8fb2d 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/TokenListStateConverter.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/TokenListStateConverter.kt @@ -8,7 +8,6 @@ import com.tangem.core.ui.components.tokenlist.state.PortfolioTokensListItemUM import com.tangem.core.ui.components.tokenlist.state.TokensListItemUM import com.tangem.core.ui.extensions.resourceReference import com.tangem.domain.account.models.AccountStatusList -import com.tangem.domain.account.models.hasMultiCurrencyAccount import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.card.common.util.cardTypesResolver import com.tangem.domain.models.TotalFiatBalance @@ -42,7 +41,6 @@ internal class TokenListStateConverter( private val yieldModuleApyMap: Map, private val stakingAvailabilityMap: Map, shouldShowMainPromo: Boolean, - private val isAddAndManageTokensEnabled: Boolean, ) : Converter { private val yieldSupplyPromoBannerConverter = YieldSupplyPromoBannerConverter( @@ -170,8 +168,7 @@ internal class TokenListStateConverter( } private fun getOrganizeTokensButtonStateV2(accountList: AccountStatusList): WalletOrganizeTokensButtonConfig? { - val shouldShowOrganizeIfOldButton = accountList.hasMultiCurrencyAccount() || isAddAndManageTokensEnabled - return if (shouldShowOrganizeIfOldButton && !isSingleCurrencyWalletWithToken()) { + return if (!isSingleCurrencyWalletWithToken()) { WalletOrganizeTokensButtonConfig( textRes = organizeButtonTextRes(), iconRes = organizeButtonIconRes(), @@ -183,17 +180,9 @@ internal class TokenListStateConverter( } } - private fun organizeButtonTextRes(): Int = if (isAddAndManageTokensEnabled) { - R.string.main_add_and_manage_tokens - } else { - R.string.organize_tokens_title - } + private fun organizeButtonTextRes(): Int = R.string.main_add_and_manage_tokens - private fun organizeButtonIconRes(): Int = if (isAddAndManageTokensEnabled) { - R.drawable.ic_filter_default_24 - } else { - R.drawable.ic_filter_24 - } + private fun organizeButtonIconRes(): Int = R.drawable.ic_filter_default_24 private fun isSingleCurrencyWalletWithToken(): Boolean { return selectedWallet is UserWallet.Cold && diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/WalletTokensListUMConverter.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/WalletTokensListUMConverter.kt index a446ce4b30..bbd03e0a0b 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/WalletTokensListUMConverter.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/WalletTokensListUMConverter.kt @@ -38,7 +38,6 @@ internal class WalletTokensListUMConverter( private val isAccountsModeEnabled: Boolean, private val expandedAccounts: Set, private val stakingAvailabilityMap: Map, - private val isAddAndManageTokensEnabled: Boolean, shouldShowMainPromo: Boolean, ) : Converter { @@ -161,16 +160,8 @@ internal class WalletTokensListUMConverter( } private fun getOrganizeButtonUM(accountList: AccountStatusList): TangemButtonUM? { - val textRes = if (isAddAndManageTokensEnabled) { - R.string.main_add_and_manage_tokens - } else { - R.string.organize_tokens_title - } - val iconRes = if (isAddAndManageTokensEnabled) { - R.drawable.ic_filter_default_24 - } else { - R.drawable.ic_filter_24 - } + val textRes = R.string.main_add_and_manage_tokens + val iconRes = R.drawable.ic_filter_default_24 return if (accountList.flattenCurrencies().isNotEmpty() && !selectedWallet.isSingleWalletWithToken()) { TangemButtonUM( text = resourceReference(textRes), diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/AccountListSubscriber.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/AccountListSubscriber.kt index 3af5b3f3b5..f98a5d1508 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/AccountListSubscriber.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/AccountListSubscriber.kt @@ -13,7 +13,6 @@ 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.WalletStateController import com.tangem.features.tangempay.TangemPayFeatureToggles -import com.tangem.features.wallet.featuretoggles.WalletFeatureToggles import com.tangem.utils.coroutines.combine7 import com.tangem.utils.logging.TangemLogger import dagger.assisted.Assisted @@ -39,13 +38,9 @@ internal class AccountListSubscriber @AssistedInject constructor( private val stakingAvailabilityListUseCase: StakingAvailabilityListUseCase, private val yieldSupplyGetShouldShowMainPromoUseCase: YieldSupplyGetShouldShowMainPromoUseCase, private val designFeatureToggles: DesignFeatureToggles, - private val walletFeatureToggles: WalletFeatureToggles, private val tangemPayFeatureToggles: TangemPayFeatureToggles, ) : BasicAccountListSubscriber() { - override val isAddAndManageTokensEnabled: Boolean - get() = walletFeatureToggles.isAddAndManageTokensEnabled - override fun create(coroutineScope: CoroutineScope): Flow<*> { val walletId = userWallet.walletId.stringValue TangemLogger.i("$TAG[$walletId]: create() called, building combine7") diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/BasicAccountListSubscriber.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/BasicAccountListSubscriber.kt index 258669bd1b..1f71b4a6fb 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/BasicAccountListSubscriber.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/BasicAccountListSubscriber.kt @@ -34,7 +34,6 @@ internal abstract class BasicAccountListSubscriber : BasicWalletSubscriber() { abstract val getSelectedAppCurrencyUseCase: GetSelectedAppCurrencyUseCase abstract val stateController: WalletStateController abstract val clickIntents: WalletClickIntents - abstract val isAddAndManageTokensEnabled: Boolean override val singleAccountStatusListSupplier: SingleAccountStatusListSupplier get() = accountDependencies.singleAccountStatusListSupplier @@ -107,7 +106,6 @@ internal abstract class BasicAccountListSubscriber : BasicWalletSubscriber() { shouldShowMainPromo = shouldShowMainPromo, isAccountsModeEnabled = isAccountMode, isRedesignEnabled = true, - isAddAndManageTokensEnabled = isAddAndManageTokensEnabled, isMultipleCardsEnabled = isMultipleCardsEnabled, ), ) @@ -172,7 +170,6 @@ internal abstract class BasicAccountListSubscriber : BasicWalletSubscriber() { shouldShowMainPromo = shouldShowMainPromo, isAccountsModeEnabled = false, isRedesignEnabled = false, - isAddAndManageTokensEnabled = isAddAndManageTokensEnabled, isMultipleCardsEnabled = false, ), ) diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/SingleWalletSubscriber.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/SingleWalletSubscriber.kt index 253f114062..e848c342a2 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/SingleWalletSubscriber.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/SingleWalletSubscriber.kt @@ -6,7 +6,6 @@ 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.WalletStateController import com.tangem.features.tangempay.TangemPayFeatureToggles -import com.tangem.features.wallet.featuretoggles.WalletFeatureToggles import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject @@ -22,13 +21,9 @@ internal class SingleWalletSubscriber @AssistedInject constructor( override val getSelectedAppCurrencyUseCase: GetSelectedAppCurrencyUseCase, override val stateController: WalletStateController, override val clickIntents: WalletClickIntents, - private val walletFeatureToggles: WalletFeatureToggles, private val tangemPayFeatureToggles: TangemPayFeatureToggles, ) : BasicAccountListSubscriber() { - override val isAddAndManageTokensEnabled: Boolean - get() = walletFeatureToggles.isAddAndManageTokensEnabled - override fun create(coroutineScope: CoroutineScope): Flow = combine( flow = getAccountStatusListFlow(), flow2 = getAppCurrencyFlow(), diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/SingleWalletWithTokenSubscriberLegacy.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/SingleWalletWithTokenSubscriberLegacy.kt index 51c0c0a603..267847199c 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/SingleWalletWithTokenSubscriberLegacy.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/subscribers/SingleWalletWithTokenSubscriberLegacy.kt @@ -5,7 +5,6 @@ import com.tangem.domain.models.wallet.UserWallet 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.WalletStateController -import com.tangem.features.wallet.featuretoggles.WalletFeatureToggles import com.tangem.utils.annotations.RemoveWithToggle import dagger.assisted.Assisted import dagger.assisted.AssistedFactory @@ -22,12 +21,8 @@ internal class SingleWalletWithTokenSubscriberLegacy @AssistedInject constructor override val getSelectedAppCurrencyUseCase: GetSelectedAppCurrencyUseCase, override val stateController: WalletStateController, override val clickIntents: WalletClickIntents, - private val walletFeatureToggles: WalletFeatureToggles, ) : BasicAccountListSubscriber() { - override val isAddAndManageTokensEnabled: Boolean - get() = walletFeatureToggles.isAddAndManageTokensEnabled - override fun create(coroutineScope: CoroutineScope): Flow = combine( flow = getAccountStatusListFlow(), flow2 = getAppCurrencyFlow(), diff --git a/features/wallet/impl/src/test/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTokenListTransformerTest.kt b/features/wallet/impl/src/test/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTokenListTransformerTest.kt index 8f79a07100..c2d1e1f38a 100644 --- a/features/wallet/impl/src/test/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTokenListTransformerTest.kt +++ b/features/wallet/impl/src/test/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTokenListTransformerTest.kt @@ -74,7 +74,6 @@ class SetTokenListTransformerTest { shouldShowMainPromo = false, isAccountsModeEnabled = false, isRedesignEnabled = true, - isAddAndManageTokensEnabled = false, isMultipleCardsEnabled = false, ) } diff --git a/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/child/wallet/model/intents/WalletContentClickIntentsAnalyticsTest.kt b/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/child/wallet/model/intents/WalletContentClickIntentsAnalyticsTest.kt index a3a30d54e8..d2f587485c 100644 --- a/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/child/wallet/model/intents/WalletContentClickIntentsAnalyticsTest.kt +++ b/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/child/wallet/model/intents/WalletContentClickIntentsAnalyticsTest.kt @@ -6,7 +6,6 @@ import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.domain.models.wallet.UserWalletId import com.tangem.feature.wallet.presentation.router.InnerWalletRouter import com.tangem.feature.wallet.presentation.wallet.state.WalletStateController -import com.tangem.features.wallet.featuretoggles.WalletFeatureToggles import io.mockk.every import io.mockk.mockk import io.mockk.slot @@ -21,7 +20,6 @@ internal class WalletContentClickIntentsAnalyticsTest { private val stateHolder: WalletStateController = mockk(relaxed = true) private val analyticsEventHandler: AnalyticsEventHandler = mockk(relaxed = true) - private val walletFeatureToggles: WalletFeatureToggles = mockk(relaxed = true) private val router: InnerWalletRouter = mockk(relaxed = true) private val userWalletId = UserWalletId(stringValue = "0123456789ABCDEF") @@ -45,16 +43,14 @@ internal class WalletContentClickIntentsAnalyticsTest { yieldSupplySetShouldShowMainPromoUseCase = mockk(relaxed = true), tokenListAnalyticsSender = mockk(relaxed = true), uiMessageSender = mockk(relaxed = true), - walletFeatureToggles = walletFeatureToggles, ) implementor.initialize(router = router, coroutineScope = TestScope()) return implementor } @Test - fun `GIVEN add and manage toggle enabled WHEN onOrganizeTokensClick THEN sends ButtonAddManage event and opens bottom sheet`() = + fun `WHEN onOrganizeTokensClick THEN sends ButtonAddManage event and opens bottom sheet`() = runTest { - every { walletFeatureToggles.isAddAndManageTokensEnabled } returns true val implementor = createImplementor() val captured = slot() @@ -67,17 +63,4 @@ internal class WalletContentClickIntentsAnalyticsTest { verify(exactly = 1) { router.openAddAndManageBottomSheet(userWalletId = userWalletId) } verify(exactly = 0) { router.openOrganizeTokensScreen(any()) } } - - @Test - fun `GIVEN add and manage toggle disabled WHEN onOrganizeTokensClick THEN does not send analytics and opens organize screen`() = - runTest { - every { walletFeatureToggles.isAddAndManageTokensEnabled } returns false - val implementor = createImplementor() - - implementor.onOrganizeTokensClick() - - verify(exactly = 0) { analyticsEventHandler.send(any()) } - verify(exactly = 1) { router.openOrganizeTokensScreen(userWalletId = userWalletId) } - verify(exactly = 0) { router.openAddAndManageBottomSheet(any()) } - } } \ No newline at end of file