Updated on 2026-08-14
This commit is contained in:
parent
0b81b905c3
commit
50332186fa
47 changed files with 38 additions and 408 deletions
|
|
@ -7,7 +7,6 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
|||
import arrow.core.getOrElse
|
||||
import com.tangem.core.decompose.context.AppComponentContext
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.domain.dynamicaddresses.DynamicAddressesFeatureToggles
|
||||
import com.tangem.domain.dynamicaddresses.repository.DynamicAddressesRepository
|
||||
import com.tangem.domain.managetokens.ValidateDerivationPathUseCase
|
||||
import com.tangem.domain.managetokens.model.exceptoin.DerivationPathValidationException
|
||||
|
|
@ -31,13 +30,11 @@ internal class DefaultCustomTokenDerivationInputComponent @AssistedInject constr
|
|||
@Assisted private val params: CustomTokenDerivationInputComponent.Params,
|
||||
private val validateDerivationPathUseCase: ValidateDerivationPathUseCase,
|
||||
private val dynamicAddressesRepository: DynamicAddressesRepository,
|
||||
private val dynamicAddressesFeatureToggles: DynamicAddressesFeatureToggles,
|
||||
) : CustomTokenDerivationInputComponent, AppComponentContext by context {
|
||||
|
||||
private val cardanoDerivationPathValidator = CardanoDerivationPathValidator()
|
||||
private val dynamicAddressesDerivationValidator = DynamicAddressesDerivationValidator(
|
||||
dynamicAddressesRepository = dynamicAddressesRepository,
|
||||
dynamicAddressesFeatureToggles = dynamicAddressesFeatureToggles,
|
||||
)
|
||||
|
||||
private val state: MutableStateFlow<CustomDerivationInputUM> = MutableStateFlow(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.tangem.features.managetokens.utils
|
|||
|
||||
import com.tangem.blockchainsdk.utils.toBlockchain
|
||||
import com.tangem.domain.dynamicaddresses.DynamicAddressesDerivationChecker
|
||||
import com.tangem.domain.dynamicaddresses.DynamicAddressesFeatureToggles
|
||||
import com.tangem.domain.dynamicaddresses.DynamicAddressesSupportedBlockchains
|
||||
import com.tangem.domain.dynamicaddresses.repository.DynamicAddressesRepository
|
||||
import com.tangem.domain.models.network.Network
|
||||
|
|
@ -18,7 +17,6 @@ import kotlinx.coroutines.flow.firstOrNull
|
|||
*/
|
||||
internal class DynamicAddressesDerivationValidator(
|
||||
private val dynamicAddressesRepository: DynamicAddressesRepository,
|
||||
private val dynamicAddressesFeatureToggles: DynamicAddressesFeatureToggles,
|
||||
) {
|
||||
|
||||
/**
|
||||
|
|
@ -29,7 +27,6 @@ internal class DynamicAddressesDerivationValidator(
|
|||
networkId: Network.ID,
|
||||
path: String?,
|
||||
): Boolean {
|
||||
if (!dynamicAddressesFeatureToggles.isDynamicAddressesEnabled) return false
|
||||
if (path == null) return false
|
||||
if (!isSupportedBlockchain(networkId)) return false
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue