Updated on 2026-08-14

This commit is contained in:
Tangem 2024-02-09 23:26:37 +01:00
parent 81cdcd0f38
commit f6fd1a51fb
8 changed files with 24 additions and 57 deletions

View file

@ -59,8 +59,6 @@ dependencies {
implementation(projects.domain.settings)
implementation(projects.domain.tokens)
implementation(projects.domain.tokens.models)
implementation(projects.domain.txhistory)
implementation(projects.domain.txhistory.models)
implementation(projects.domain.wallets)
implementation(projects.domain.wallets.models)
implementation(projects.domain.appCurrency)

View file

@ -2,7 +2,7 @@ package com.tangem.managetokens.presentation.addcustomtoken.state.factory
import com.tangem.core.ui.event.consumedEvent
import com.tangem.core.ui.event.triggeredEvent
import com.tangem.domain.AddCustomTokenError
import com.tangem.domain.tokens.error.AddCustomTokenError
import com.tangem.domain.tokens.model.Network
import com.tangem.domain.wallets.models.UserWallet
import com.tangem.domain.wallets.models.UserWalletId
@ -285,7 +285,7 @@ internal class AddCustomTokenStateFactory(
fun handleAddressError(error: AddCustomTokenError): AddCustomTokenState {
val uiState = currentStateProvider()
return when (error) {
AddCustomTokenError.InvalidContractAddress -> {
AddCustomTokenError.INVALID_CONTRACT_ADDRESS -> {
addTokenAddressFieldError(AddCustomTokenWarning.InvalidContractAddress)
.copy(
addTokenButton = uiState.addTokenButton.copy(isEnabled = false),
@ -294,7 +294,7 @@ internal class AddCustomTokenStateFactory(
.toPersistentSet(),
)
}
AddCustomTokenError.FieldIsEmpty ->
AddCustomTokenError.FIELD_IS_EMPTY ->
removeTokenAddressError()
.copy(
addTokenButton = uiState.addTokenButton.copy(