Updated on 2026-08-14

This commit is contained in:
Tangem 2025-06-19 15:08:55 +05:00
parent 803f0bdfec
commit 0d63a74f75
4 changed files with 72 additions and 31 deletions

View file

@ -3,7 +3,7 @@ package com.tangem.features.managetokens.utils
import arrow.core.getOrElse
import com.tangem.core.decompose.di.ModelScoped
import com.tangem.domain.managetokens.CheckIsCurrencyNotAddedUseCase
import com.tangem.domain.managetokens.CreateCurrencyUseCase
import com.tangem.domain.managetokens.CreateCryptoCurrencyUseCase
import com.tangem.domain.managetokens.FindTokenUseCase
import com.tangem.domain.managetokens.ValidateTokenFormUseCase
import com.tangem.domain.managetokens.model.AddCustomTokenForm
@ -23,7 +23,7 @@ import javax.inject.Inject
@ModelScoped
internal class CustomCurrencyValidator @Inject constructor(
private val validateTokenFormUseCase: ValidateTokenFormUseCase,
private val createCustomCurrencyUseCase: CreateCurrencyUseCase,
private val createCryptoCurrencyUseCase: CreateCryptoCurrencyUseCase,
private val findTokenUseCase: FindTokenUseCase,
private val checkIsCurrencyNotAddedUseCase: CheckIsCurrencyNotAddedUseCase,
) {
@ -164,7 +164,7 @@ internal class CustomCurrencyValidator @Inject constructor(
derivationPath: Network.DerivationPath,
validatedForm: AddCustomTokenForm.Validated.All?,
) {
val currency = createCustomCurrencyUseCase(
val currency = createCryptoCurrencyUseCase(
userWalletId = userWalletId,
networkId = networkId,
derivationPath = derivationPath,