Updated on 2026-08-14

This commit is contained in:
Tangem 2026-04-29 20:50:41 +05:00
parent f086d6bb74
commit 40fe8bb5cb
56 changed files with 82 additions and 1491 deletions

View file

@ -23,7 +23,6 @@ import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase
import com.tangem.domain.wallets.usecase.GetUserWalletUseCase
import com.tangem.domain.wallets.usecase.SelectWalletUseCase
import com.tangem.features.pushnotifications.api.analytics.PushNotificationAnalyticEvents
import com.tangem.features.tangempay.TangemPayFeatureToggles
import com.tangem.features.tokendetails.deeplink.TokenDetailsDeepLinkHandler
import com.tangem.features.wallet.deeplink.WalletDeepLinkActionTrigger
import com.tangem.utils.logging.TangemLogger
@ -47,7 +46,6 @@ internal class DefaultTokenDetailsDeepLinkHandler @AssistedInject constructor(
private val getUserWalletUseCase: GetUserWalletUseCase,
private val getSelectedWalletSyncUseCase: GetSelectedWalletSyncUseCase,
private val walletBalanceFetcher: WalletBalanceFetcher,
private val tangemPayFeatureToggles: TangemPayFeatureToggles,
private val singleAccountListSupplier: SingleAccountListSupplier,
) : TokenDetailsDeepLinkHandler {
@ -133,10 +131,7 @@ internal class DefaultTokenDetailsDeepLinkHandler @AssistedInject constructor(
currency = cryptoCurrency,
)
!isMultiCurrency -> walletBalanceFetcher(
params = WalletBalanceFetcher.Params(
userWalletId = userWallet.walletId,
isPaymentAccountRefactorEnabled = tangemPayFeatureToggles.isTangemPayAccountsRefactorEnabled,
),
params = WalletBalanceFetcher.Params(userWalletId = userWallet.walletId),
)
}
}

View file

@ -25,7 +25,6 @@ import com.tangem.domain.wallets.models.GetUserWalletError
import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase
import com.tangem.domain.wallets.usecase.GetUserWalletUseCase
import com.tangem.domain.wallets.usecase.SelectWalletUseCase
import com.tangem.features.tangempay.TangemPayFeatureToggles
import com.tangem.features.wallet.deeplink.WalletDeepLinkActionTrigger
import com.tangem.utils.logging.TangemLogger
import io.mockk.*
@ -50,7 +49,6 @@ class DefaultTokenDetailsDeepLinkHandlerTest {
private val analyticsEventHandler: AnalyticsEventHandler = mockk()
private val getUserWalletUseCase: GetUserWalletUseCase = mockk()
private val walletBalanceFetcher: WalletBalanceFetcher = mockk()
private val tangemPayFeatureToggles: TangemPayFeatureToggles = mockk()
private val singleAccountListSupplier: SingleAccountListSupplier = mockk()
@BeforeEach
@ -443,12 +441,10 @@ class DefaultTokenDetailsDeepLinkHandlerTest {
userWalletId = userWalletId,
cryptoCurrencies = listOf(expectedCryptoCurrency),
)
every { tangemPayFeatureToggles.isTangemPayAccountsRefactorEnabled } returns true
coEvery {
walletBalanceFetcher.invoke(
WalletBalanceFetcher.Params(
userWalletId = userWalletId,
isPaymentAccountRefactorEnabled = true
)
)
} returns mockk()
@ -460,7 +456,6 @@ class DefaultTokenDetailsDeepLinkHandlerTest {
walletBalanceFetcher.invoke(
WalletBalanceFetcher.Params(
userWalletId = userWalletId,
isPaymentAccountRefactorEnabled = true
)
)
}
@ -483,7 +478,6 @@ class DefaultTokenDetailsDeepLinkHandlerTest {
analyticsEventHandler = analyticsEventHandler,
getUserWalletUseCase = getUserWalletUseCase,
walletBalanceFetcher = walletBalanceFetcher,
tangemPayFeatureToggles = tangemPayFeatureToggles,
singleAccountListSupplier = singleAccountListSupplier,
getSelectedWalletSyncUseCase = getSelectedWalletSync,
)