From 88ed1d92f380a018b85c8ee8f2b19899f1197d8f Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 22 Aug 2024 16:00:07 +0400 Subject: [PATCH] Updated on 2026-08-14 --- .../managetokens/entity/CurrencyNetworkUM.kt | 15 --------- .../{ => customtoken}/CustomTokenFormUM.kt | 32 +++++++++---------- .../entity/{ => item}/CurrencyItemUM.kt | 2 +- .../entity/item/CurrencyNetworkUM.kt | 16 ++++++++++ .../entity/item/DerivationPathUM.kt | 13 ++++++++ .../entity/item/SelectableItemUM.kt | 11 +++++++ .../entity/managetokens/BottomSheetConfig.kt | 13 ++++++++ .../ManageTokensTopBarUM.kt | 2 +- .../{ => managetokens}/ManageTokensUM.kt | 3 +- .../managetokens/model/ManageTokensModel.kt | 7 ++-- .../managetokens/ui/ManageTokensScreen.kt | 8 ++--- .../utils/list/ManageTokensListManager.kt | 2 +- .../utils/list/ManageTokensListState.kt | 2 +- .../utils/list/ManageTokensUiManager.kt | 2 +- .../utils/mapper/CurrencyItemMapper.kt | 4 +-- .../utils/mapper/CurrencyNetworksMapper.kt | 6 ++-- .../utils/ui/CurrencyItemOperations.kt | 8 ++--- .../utils/ui/CurrencyNetworkOperations.kt | 4 +-- 18 files changed, 94 insertions(+), 56 deletions(-) delete mode 100644 features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CurrencyNetworkUM.kt rename features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/{ => customtoken}/CustomTokenFormUM.kt (58%) rename features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/{ => item}/CurrencyItemUM.kt (95%) create mode 100644 features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/CurrencyNetworkUM.kt create mode 100644 features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/DerivationPathUM.kt create mode 100644 features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/SelectableItemUM.kt create mode 100644 features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/BottomSheetConfig.kt rename features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/{ => managetokens}/ManageTokensTopBarUM.kt (91%) rename features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/{ => managetokens}/ManageTokensUM.kt (94%) diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CurrencyNetworkUM.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CurrencyNetworkUM.kt deleted file mode 100644 index 477585db3f..0000000000 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CurrencyNetworkUM.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.tangem.features.managetokens.entity - -import androidx.compose.runtime.Immutable -import com.tangem.domain.tokens.model.Network - -@Immutable -internal data class CurrencyNetworkUM( - val id: Network.ID, - val name: String, - val type: String, - val iconResId: Int, - val isMainNetwork: Boolean, - val isSelected: Boolean, - val onSelectedStateChange: (Boolean) -> Unit, -) \ No newline at end of file diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CustomTokenFormUM.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/customtoken/CustomTokenFormUM.kt similarity index 58% rename from features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CustomTokenFormUM.kt rename to features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/customtoken/CustomTokenFormUM.kt index ea9bfbceb0..902c7de226 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CustomTokenFormUM.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/customtoken/CustomTokenFormUM.kt @@ -1,42 +1,40 @@ -package com.tangem.features.managetokens.entity +package com.tangem.features.managetokens.entity.customtoken -import androidx.compose.runtime.Immutable import com.tangem.core.ui.components.notifications.NotificationConfig import com.tangem.core.ui.extensions.TextReference import kotlinx.collections.immutable.ImmutableList +import kotlinx.collections.immutable.persistentListOf -@Immutable internal data class CustomTokenFormUM( val networkName: ClickableFieldUM, - val contractAddress: TextInputFieldUM, - val tokenName: TextInputFieldUM, - val tokenSymbol: TextInputFieldUM, - val tokenDecimals: TextInputFieldUM, val derivationPath: ClickableFieldUM, - val notifications: ImmutableList, - val canAddToken: Boolean, - val onNetworkClick: () -> Unit, - val onDerivationPathClick: () -> Unit, - val onAddClick: () -> Unit, + val tokenForm: TokenFormUM?, + val notifications: ImmutableList = persistentListOf(), + val canAddToken: Boolean = false, + val saveToken: () -> Unit, ) { - @Immutable + data class TokenFormUM( + val contractAddress: TextInputFieldUM, + val name: TextInputFieldUM, + val symbol: TextInputFieldUM, + val decimals: TextInputFieldUM, + ) + data class NotificationUM( val id: String, val config: NotificationConfig, ) } -@Immutable internal data class TextInputFieldUM( val label: TextReference, val placeholder: TextReference, - val value: String, - val onValueChange: (String) -> Unit, + val value: String = "", val error: TextReference? = null, + val onValueChange: (String) -> Unit, ) -@Immutable internal data class ClickableFieldUM( val label: TextReference, val value: TextReference, diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CurrencyItemUM.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/CurrencyItemUM.kt similarity index 95% rename from features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CurrencyItemUM.kt rename to features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/CurrencyItemUM.kt index eec4f853bc..b61c576c2f 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/CurrencyItemUM.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/CurrencyItemUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.managetokens.entity +package com.tangem.features.managetokens.entity.item import androidx.compose.runtime.Immutable import com.tangem.core.ui.components.currency.icon.CurrencyIconState diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/CurrencyNetworkUM.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/CurrencyNetworkUM.kt new file mode 100644 index 0000000000..84f3aabb87 --- /dev/null +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/CurrencyNetworkUM.kt @@ -0,0 +1,16 @@ +package com.tangem.features.managetokens.entity.item + +import com.tangem.domain.tokens.model.Network + +internal data class CurrencyNetworkUM( + val networkId: Network.ID, + val name: String, + val type: String, + val iconResId: Int, + val isMainNetwork: Boolean, + override val isSelected: Boolean, + override val onSelectedStateChange: (Boolean) -> Unit, +) : SelectableItemUM { + + override val id: String = networkId.value +} \ No newline at end of file diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/DerivationPathUM.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/DerivationPathUM.kt new file mode 100644 index 0000000000..2190c50e4f --- /dev/null +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/DerivationPathUM.kt @@ -0,0 +1,13 @@ +package com.tangem.features.managetokens.entity.item + +import com.tangem.core.ui.extensions.TextReference + +internal data class DerivationPathUM( + val value: String, + val blockchainName: TextReference, + override val isSelected: Boolean, + override val onSelectedStateChange: (Boolean) -> Unit, +) : SelectableItemUM { + + override val id: String = value +} \ No newline at end of file diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/SelectableItemUM.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/SelectableItemUM.kt new file mode 100644 index 0000000000..73c5910af8 --- /dev/null +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/item/SelectableItemUM.kt @@ -0,0 +1,11 @@ +package com.tangem.features.managetokens.entity.item + +import androidx.compose.runtime.Immutable + +@Immutable +internal sealed interface SelectableItemUM { + + val id: String + val isSelected: Boolean + val onSelectedStateChange: (Boolean) -> Unit +} \ No newline at end of file diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/BottomSheetConfig.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/BottomSheetConfig.kt new file mode 100644 index 0000000000..102140a57c --- /dev/null +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/BottomSheetConfig.kt @@ -0,0 +1,13 @@ +package com.tangem.features.managetokens.entity.managetokens + +import com.tangem.domain.wallets.models.UserWalletId +import kotlinx.serialization.Serializable + +@Serializable +internal sealed class BottomSheetConfig { + + @Serializable + data class AddCustomToken( + val userWalletId: UserWalletId, + ) : BottomSheetConfig() +} \ No newline at end of file diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/ManageTokensTopBarUM.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/ManageTokensTopBarUM.kt similarity index 91% rename from features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/ManageTokensTopBarUM.kt rename to features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/ManageTokensTopBarUM.kt index b2f08a0ef0..875ed483ed 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/ManageTokensTopBarUM.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/ManageTokensTopBarUM.kt @@ -1,4 +1,4 @@ -package com.tangem.features.managetokens.entity +package com.tangem.features.managetokens.entity.managetokens import androidx.compose.runtime.Immutable import com.tangem.core.ui.components.appbar.models.TopAppBarButtonUM diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/ManageTokensUM.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/ManageTokensUM.kt similarity index 94% rename from features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/ManageTokensUM.kt rename to features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/ManageTokensUM.kt index bd8e4f27bf..4fc9d627c7 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/ManageTokensUM.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/entity/managetokens/ManageTokensUM.kt @@ -1,7 +1,8 @@ -package com.tangem.features.managetokens.entity +package com.tangem.features.managetokens.entity.managetokens import androidx.compose.runtime.Immutable import com.tangem.core.ui.components.fields.entity.SearchBarUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM import kotlinx.collections.immutable.ImmutableList @Immutable diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/model/ManageTokensModel.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/model/ManageTokensModel.kt index c56ae2b5b9..c348a45e46 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/model/ManageTokensModel.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/model/ManageTokensModel.kt @@ -12,9 +12,10 @@ import com.tangem.core.ui.extensions.stringReference import com.tangem.core.ui.message.SnackbarMessage import com.tangem.domain.wallets.models.UserWalletId import com.tangem.features.managetokens.component.ManageTokensComponent -import com.tangem.features.managetokens.entity.CurrencyItemUM -import com.tangem.features.managetokens.entity.ManageTokensTopBarUM -import com.tangem.features.managetokens.entity.ManageTokensUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM +import com.tangem.features.managetokens.entity.managetokens.BottomSheetConfig +import com.tangem.features.managetokens.entity.managetokens.ManageTokensTopBarUM +import com.tangem.features.managetokens.entity.managetokens.ManageTokensUM import com.tangem.features.managetokens.impl.R import com.tangem.features.managetokens.utils.list.ChangedCurrencies import com.tangem.features.managetokens.utils.list.ManageTokensListManager diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/ui/ManageTokensScreen.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/ui/ManageTokensScreen.kt index 2104369a82..547963c3b0 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/ui/ManageTokensScreen.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/ui/ManageTokensScreen.kt @@ -50,10 +50,10 @@ import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemThemePreview import com.tangem.core.ui.utils.WindowInsetsZero import com.tangem.features.managetokens.component.preview.PreviewManageTokensComponent -import com.tangem.features.managetokens.entity.CurrencyItemUM -import com.tangem.features.managetokens.entity.CurrencyItemUM.Basic.NetworksUM -import com.tangem.features.managetokens.entity.ManageTokensTopBarUM -import com.tangem.features.managetokens.entity.ManageTokensUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM.Basic.NetworksUM +import com.tangem.features.managetokens.entity.managetokens.ManageTokensTopBarUM +import com.tangem.features.managetokens.entity.managetokens.ManageTokensUM import com.tangem.features.managetokens.impl.R import kotlinx.collections.immutable.ImmutableList diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensListManager.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensListManager.kt index df07878c62..62ab953402 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensListManager.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensListManager.kt @@ -14,7 +14,7 @@ import com.tangem.domain.managetokens.model.ManagedCryptoCurrency import com.tangem.domain.tokens.CheckHasLinkedTokensUseCase import com.tangem.domain.tokens.model.Network import com.tangem.domain.wallets.models.UserWalletId -import com.tangem.features.managetokens.entity.CurrencyItemUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM import com.tangem.features.managetokens.impl.R import com.tangem.pagination.BatchAction import com.tangem.pagination.BatchListState diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensListState.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensListState.kt index ac6732fd19..a140122502 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensListState.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensListState.kt @@ -4,7 +4,7 @@ import com.tangem.domain.managetokens.model.ManageTokensListConfig import com.tangem.domain.managetokens.model.ManageTokensUpdateAction import com.tangem.domain.managetokens.model.ManagedCryptoCurrency import com.tangem.domain.wallets.models.UserWalletId -import com.tangem.features.managetokens.entity.CurrencyItemUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM import com.tangem.pagination.Batch import com.tangem.pagination.BatchAction import com.tangem.pagination.PaginationStatus diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensUiManager.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensUiManager.kt index ffb78bccf2..546761dcfb 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensUiManager.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/list/ManageTokensUiManager.kt @@ -4,7 +4,7 @@ import com.tangem.core.decompose.ui.UiMessageSender import com.tangem.core.ui.message.ContentMessage import com.tangem.domain.managetokens.model.ManagedCryptoCurrency import com.tangem.domain.tokens.model.Network -import com.tangem.features.managetokens.entity.CurrencyItemUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM import com.tangem.features.managetokens.ui.dialog.HasLinkedTokensWarning import com.tangem.features.managetokens.ui.dialog.HideTokenWarning import com.tangem.features.managetokens.utils.mapper.toUiModel diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/mapper/CurrencyItemMapper.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/mapper/CurrencyItemMapper.kt index f2bbfb18be..d37da299a6 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/mapper/CurrencyItemMapper.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/mapper/CurrencyItemMapper.kt @@ -5,8 +5,8 @@ import com.tangem.core.ui.extensions.getTintForTokenIcon import com.tangem.core.ui.extensions.tryGetBackgroundForTokenIcon import com.tangem.core.ui.res.TangemColorPalette import com.tangem.domain.managetokens.model.ManagedCryptoCurrency -import com.tangem.features.managetokens.entity.CurrencyItemUM -import com.tangem.features.managetokens.entity.CurrencyItemUM.Basic.NetworksUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM.Basic.NetworksUM import com.tangem.features.managetokens.utils.ui.getIconRes internal fun ManagedCryptoCurrency.toUiModel( diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/mapper/CurrencyNetworksMapper.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/mapper/CurrencyNetworksMapper.kt index 7b210d5b19..71d9885d89 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/mapper/CurrencyNetworksMapper.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/mapper/CurrencyNetworksMapper.kt @@ -2,8 +2,8 @@ package com.tangem.features.managetokens.utils.mapper import com.tangem.domain.managetokens.model.ManagedCryptoCurrency import com.tangem.domain.managetokens.model.ManagedCryptoCurrency.SourceNetwork -import com.tangem.features.managetokens.entity.CurrencyItemUM.Basic.NetworksUM -import com.tangem.features.managetokens.entity.CurrencyNetworkUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM.Basic.NetworksUM +import com.tangem.features.managetokens.entity.item.CurrencyNetworkUM import com.tangem.features.managetokens.utils.ui.getIconRes import kotlinx.collections.immutable.toImmutableList @@ -33,7 +33,7 @@ private fun SourceNetwork.toUiModel( onSelectedStateChange: (SourceNetwork, Boolean) -> Unit, ): CurrencyNetworkUM { return CurrencyNetworkUM( - id = id, + networkId = id, name = network.name.uppercase(), iconResId = id.getIconRes(isColored = isSelected || !isEditable), isSelected = isSelected || !isEditable, diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/ui/CurrencyItemOperations.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/ui/CurrencyItemOperations.kt index 20e1c72a6e..d8b0a83776 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/ui/CurrencyItemOperations.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/ui/CurrencyItemOperations.kt @@ -2,8 +2,8 @@ package com.tangem.features.managetokens.utils.ui import com.tangem.domain.managetokens.model.ManagedCryptoCurrency import com.tangem.domain.managetokens.model.ManagedCryptoCurrency.SourceNetwork -import com.tangem.features.managetokens.entity.CurrencyItemUM -import com.tangem.features.managetokens.entity.CurrencyItemUM.Basic.NetworksUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM +import com.tangem.features.managetokens.entity.item.CurrencyItemUM.Basic.NetworksUM import com.tangem.features.managetokens.utils.mapper.toUiNetworksModel import kotlinx.collections.immutable.toImmutableList @@ -55,10 +55,10 @@ private fun CurrencyItemUM.Basic.updateNetworks(currency: ManagedCryptoCurrency. is NetworksUM.Collapsed -> networks is NetworksUM.Expanded -> networks.copy( networks = networks.networks.map { network -> - val isSelected = network.id in currency.addedIn + val isSelected = network.networkId in currency.addedIn network.copy( - iconResId = network.id.getIconRes(isSelected), + iconResId = network.networkId.getIconRes(isSelected), isSelected = isSelected, ) }.toImmutableList(), diff --git a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/ui/CurrencyNetworkOperations.kt b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/ui/CurrencyNetworkOperations.kt index 290c1a756f..562f0db8a2 100644 --- a/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/ui/CurrencyNetworkOperations.kt +++ b/features/manage-tokens/impl/src/main/kotlin/com/tangem/features/managetokens/utils/ui/CurrencyNetworkOperations.kt @@ -4,11 +4,11 @@ import androidx.annotation.DrawableRes import com.tangem.core.ui.extensions.getActiveIconRes import com.tangem.core.ui.extensions.getGreyedOutIconRes import com.tangem.domain.tokens.model.Network -import com.tangem.features.managetokens.entity.CurrencyNetworkUM +import com.tangem.features.managetokens.entity.item.CurrencyNetworkUM internal fun CurrencyNetworkUM.select(isSelected: Boolean): CurrencyNetworkUM { return copy( - iconResId = id.getIconRes(isSelected), + iconResId = networkId.getIconRes(isSelected), isSelected = isSelected, ) }