Updated on 2026-08-14

This commit is contained in:
Tangem 2024-06-26 19:09:46 +04:00
parent e2403d5f5f
commit 1fbf2debcd
35 changed files with 169 additions and 156 deletions

View file

@ -5,7 +5,7 @@ import com.tangem.common.ui.amountScreen.AmountScreenClickIntents
import com.tangem.common.ui.amountScreen.converters.field.AmountFieldConverter
import com.tangem.common.ui.amountScreen.models.AmountState
import com.tangem.common.ui.amountScreen.models.AmountSegmentedButtonsConfig
import com.tangem.core.ui.components.currency.tokenicon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.extensions.stringReference
import com.tangem.core.ui.extensions.wrappedList

View file

@ -1,7 +1,7 @@
package com.tangem.common.ui.amountScreen.models
import androidx.compose.runtime.Immutable
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.extensions.TextReference
/**
@ -15,7 +15,7 @@ import com.tangem.core.ui.extensions.TextReference
@Immutable
data class AmountSegmentedButtonsConfig(
val title: TextReference,
val iconState: TokenIconState? = null,
val iconState: CurrencyIconState? = null,
val iconUrl: String? = null,
val isFiat: Boolean,
)

View file

@ -1,7 +1,7 @@
package com.tangem.common.ui.amountScreen.models
import androidx.compose.runtime.Stable
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.extensions.TextReference
import kotlinx.collections.immutable.PersistentList
@ -26,7 +26,7 @@ sealed class AmountState {
override val isPrimaryButtonEnabled: Boolean,
val walletName: String,
val walletBalance: TextReference,
val tokenIconState: TokenIconState,
val tokenIconState: CurrencyIconState,
val segmentedButtonConfig: PersistentList<AmountSegmentedButtonsConfig>,
val selectedButton: Int,
val isSegmentedButtonsEnabled: Boolean,

View file

@ -5,7 +5,7 @@ import androidx.compose.foundation.text.KeyboardOptions
import com.tangem.common.ui.amountScreen.models.AmountFieldModel
import com.tangem.common.ui.amountScreen.models.AmountSegmentedButtonsConfig
import com.tangem.common.ui.amountScreen.models.AmountState
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.stringReference
import com.tangem.domain.tokens.model.Amount
@ -19,11 +19,11 @@ object AmountStatePreviewData {
isPrimaryButtonEnabled = false,
walletName = "Family Wallet",
walletBalance = stringReference("2 130,88 USDT (2 129,92 \$)"),
tokenIconState = TokenIconState.Loading,
tokenIconState = CurrencyIconState.Loading,
segmentedButtonConfig = persistentListOf(
AmountSegmentedButtonsConfig(
title = stringReference("USDT"),
iconState = TokenIconState.Locked,
iconState = CurrencyIconState.Locked,
isFiat = false,
),
AmountSegmentedButtonsConfig(

View file

@ -18,7 +18,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import com.tangem.common.ui.amountScreen.models.AmountState
import com.tangem.common.ui.amountScreen.preview.AmountStatePreviewData
import com.tangem.core.ui.components.ResizableText
import com.tangem.core.ui.components.currency.tokenicon.TokenIcon
import com.tangem.core.ui.components.currency.icon.CurrencyIcon
import com.tangem.core.ui.res.TangemThemePreview
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.utils.BigDecimalFormatter
@ -54,7 +54,7 @@ fun AmountBlock(amountState: AmountState, isClickDisabled: Boolean, isEditingDis
.clickable(enabled = !isClickDisabled && !isEditingDisabled, onClick = onClick)
.padding(TangemTheme.dimens.spacing16),
) {
TokenIcon(state = amountState.tokenIconState)
CurrencyIcon(state = amountState.tokenIconState)
ResizableText(
text = firstAmount,
style = TangemTheme.typography.h2,

View file

@ -19,7 +19,7 @@ import com.tangem.common.ui.amountScreen.models.AmountSegmentedButtonsConfig
import com.tangem.core.ui.components.SpacerWMax
import com.tangem.core.ui.components.buttons.segmentedbutton.SegmentedButtons
import com.tangem.core.ui.components.currency.fiaticon.FiatIcon
import com.tangem.core.ui.components.currency.tokenicon.TokenIcon
import com.tangem.core.ui.components.currency.icon.CurrencyIcon
import com.tangem.core.ui.extensions.resolveReference
import com.tangem.core.ui.res.TangemTheme
import kotlinx.collections.immutable.PersistentList
@ -105,7 +105,7 @@ private fun AmountCurrencyButton(button: AmountSegmentedButtonsConfig, isSegment
modifier = iconModifier,
)
} else if (button.iconState != null) {
TokenIcon(
CurrencyIcon(
state = button.iconState,
shouldDisplayNetwork = false,
modifier = iconModifier,

View file

@ -13,7 +13,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.style.TextAlign
import com.tangem.common.ui.amountScreen.models.AmountState
import com.tangem.core.ui.components.currency.tokenicon.TokenIcon
import com.tangem.core.ui.components.currency.icon.CurrencyIcon
import com.tangem.core.ui.extensions.resolveReference
import com.tangem.core.ui.res.TangemTheme
import com.tangem.utils.Strings.STARS
@ -55,7 +55,7 @@ internal fun LazyListScope.amountField(
.padding(top = TangemTheme.dimens.spacing2),
)
}
TokenIcon(
CurrencyIcon(
state = amountState.tokenIconState,
modifier = Modifier
.padding(top = TangemTheme.dimens.spacing32),

View file

@ -13,7 +13,7 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp
import coil.compose.SubcomposeAsyncImage
import coil.request.ImageRequest
import com.tangem.core.ui.components.currency.tokenicon.LoadingIcon
import com.tangem.core.ui.components.currency.icon.LoadingIcon
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.utils.ImageBackgroundContrastChecker
import kotlinx.coroutines.launch

View file

@ -1,4 +1,4 @@
package com.tangem.core.ui.components.currency.tokenicon
package com.tangem.core.ui.components.currency.icon
import androidx.annotation.DrawableRes
import androidx.compose.foundation.Image
@ -18,20 +18,20 @@ import com.tangem.core.ui.res.TangemTheme
@Composable
internal fun ContentIcon(
icon: TokenIconState,
icon: CurrencyIconState,
alpha: Float,
colorFilter: ColorFilter?,
modifier: Modifier = Modifier,
) {
when (icon) {
is TokenIconState.CoinIcon -> CoinIcon(
is CurrencyIconState.CoinIcon -> CoinIcon(
modifier = modifier,
url = icon.url,
fallbackResId = icon.fallbackResId,
alpha = alpha,
colorFilter = colorFilter,
)
is TokenIconState.TokenIcon -> TokenIcon(
is CurrencyIconState.TokenIcon -> TokenIcon(
modifier = modifier,
url = icon.url,
alpha = alpha,
@ -45,14 +45,14 @@ internal fun ContentIcon(
)
},
)
is TokenIconState.CustomTokenIcon -> CustomTokenIcon(
is CurrencyIconState.CustomTokenIcon -> CustomTokenIcon(
modifier = modifier,
tint = icon.tint,
background = icon.background,
alpha = alpha,
)
TokenIconState.Loading,
TokenIconState.Locked,
CurrencyIconState.Loading,
CurrencyIconState.Locked,
-> Unit
}
}

View file

@ -1,4 +1,4 @@
package com.tangem.core.ui.components.currency.tokenicon
package com.tangem.core.ui.components.currency.icon
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
@ -26,23 +26,23 @@ import com.tangem.core.ui.utils.NORMAL_ALPHA
* @param shouldDisplayNetwork specifies whether to display network badge
*/
@Composable
fun TokenIcon(state: TokenIconState, modifier: Modifier = Modifier, shouldDisplayNetwork: Boolean = true) {
fun CurrencyIcon(state: CurrencyIconState, modifier: Modifier = Modifier, shouldDisplayNetwork: Boolean = true) {
BaseContainer(modifier = modifier) {
val iconModifier = Modifier
.align(Alignment.Center)
.size(TangemTheme.dimens.size36)
when (state) {
is TokenIconState.Loading -> LoadingIcon(modifier = iconModifier)
is TokenIconState.Locked -> LockedIcon(modifier = iconModifier)
is TokenIconState.CoinIcon,
is TokenIconState.CustomTokenIcon,
is TokenIconState.TokenIcon,
is CurrencyIconState.Loading -> LoadingIcon(modifier = iconModifier)
is CurrencyIconState.Locked -> LockedIcon(modifier = iconModifier)
is CurrencyIconState.CoinIcon,
is CurrencyIconState.CustomTokenIcon,
is CurrencyIconState.TokenIcon,
-> {
ContentIconContainer(
icon = state,
modifier = iconModifier,
shouldDisplayNetwork = shouldDisplayNetwork,
shouldShowTopBadge = shouldDisplayNetwork,
)
}
}
@ -70,9 +70,9 @@ private fun LockedIcon(modifier: Modifier = Modifier) {
@Composable
private fun BoxScope.ContentIconContainer(
icon: TokenIconState,
icon: CurrencyIconState,
shouldShowTopBadge: Boolean,
modifier: Modifier = Modifier,
shouldDisplayNetwork: Boolean = true,
) {
val networkBadgeOffset = TangemTheme.dimens.spacing4
val (alpha, colorFilter) = remember(icon.isGrayscale) {
@ -90,19 +90,21 @@ private fun BoxScope.ContentIconContainer(
colorFilter = colorFilter,
)
if (icon.networkBadgeIconResId != null && shouldDisplayNetwork) {
NetworkBadge(
if (icon.topBadgeIconResId != null && shouldShowTopBadge) {
TopBadge(
modifier = Modifier
.offset(x = networkBadgeOffset, y = -networkBadgeOffset)
.align(Alignment.TopEnd),
iconResId = requireNotNull(icon.networkBadgeIconResId),
iconResId = requireNotNull(icon.topBadgeIconResId),
alpha = alpha,
colorFilter = colorFilter,
)
}
if (icon.showCustomBadge) {
CustomBadge(modifier = Modifier.align(Alignment.BottomEnd))
BottomBadge(
modifier = Modifier.align(Alignment.BottomEnd),
)
}
}

View file

@ -1,4 +1,4 @@
package com.tangem.core.ui.components.currency.tokenicon
package com.tangem.core.ui.components.currency.icon
import androidx.annotation.DrawableRes
import androidx.compose.runtime.Immutable
@ -10,11 +10,11 @@ import androidx.compose.ui.graphics.Color
* [REDACTED_TODO_COMMENT]
*/
@Immutable
sealed class TokenIconState {
sealed class CurrencyIconState {
abstract val isGrayscale: Boolean
abstract val showCustomBadge: Boolean
abstract val networkBadgeIconResId: Int?
abstract val topBadgeIconResId: Int?
/**
* Represents a coin icon.
@ -29,16 +29,16 @@ sealed class TokenIconState {
@DrawableRes val fallbackResId: Int,
override val isGrayscale: Boolean,
override val showCustomBadge: Boolean,
) : TokenIconState() {
) : CurrencyIconState() {
override val networkBadgeIconResId: Int? = null
override val topBadgeIconResId: Int? = null
}
/**
* Represents a token icon.
*
* @property url The URL where the token icon can be fetched from. May be `null` if not found.
* @property networkBadgeIconResId The drawable resource ID for the network badge.
* @property topBadgeIconResId The drawable resource ID for the network badge.
* @property isGrayscale Specifies whether to show the icon in grayscale.
* @property showCustomBadge Specifies whether to show the custom token badge.
* @property fallbackTint The color to be used for tinting the fallback icon.
@ -46,39 +46,39 @@ sealed class TokenIconState {
*/
data class TokenIcon(
val url: String?,
@DrawableRes override val networkBadgeIconResId: Int,
@DrawableRes override val topBadgeIconResId: Int,
override val isGrayscale: Boolean,
override val showCustomBadge: Boolean,
val fallbackTint: Color,
val fallbackBackground: Color,
) : TokenIconState()
) : CurrencyIconState()
/**
* Represents a custom token icon.
*
* @property tint The color to be used for tinting the icon.
* @property background The background color to be used for the icon.
* @property networkBadgeIconResId The drawable resource ID for the network badge.
* @property topBadgeIconResId The drawable resource ID for the network badge.
* @property isGrayscale Specifies whether to show the icon in grayscale.
* @property showCustomBadge Specifies whether to show the custom token badge.
*/
data class CustomTokenIcon(
val tint: Color,
val background: Color,
@DrawableRes override val networkBadgeIconResId: Int,
@DrawableRes override val topBadgeIconResId: Int,
override val isGrayscale: Boolean,
override val showCustomBadge: Boolean = true,
) : TokenIconState()
) : CurrencyIconState()
data object Loading : TokenIconState() {
data object Loading : CurrencyIconState() {
override val isGrayscale: Boolean = false
override val showCustomBadge: Boolean = false
override val networkBadgeIconResId: Int? = null
override val topBadgeIconResId: Int? = null
}
data object Locked : TokenIconState() {
data object Locked : CurrencyIconState() {
override val isGrayscale: Boolean = false
override val showCustomBadge: Boolean = false
override val networkBadgeIconResId: Int? = null
override val topBadgeIconResId: Int? = null
}
}

View file

@ -1,4 +1,4 @@
package com.tangem.core.ui.components.currency.tokenicon
package com.tangem.core.ui.components.currency.icon
import androidx.annotation.DrawableRes
import androidx.compose.foundation.Image
@ -14,7 +14,7 @@ import androidx.compose.ui.res.painterResource
import com.tangem.core.ui.res.TangemTheme
@Composable
internal fun NetworkBadge(
internal fun TopBadge(
@DrawableRes iconResId: Int,
alpha: Float,
colorFilter: ColorFilter?,
@ -41,7 +41,7 @@ internal fun NetworkBadge(
}
@Composable
internal fun CustomBadge(modifier: Modifier = Modifier) {
internal fun BottomBadge(modifier: Modifier = Modifier) {
Box(
modifier = modifier
.size(TangemTheme.dimens.size12)

View file

@ -1,6 +1,6 @@
package com.tangem.core.ui.components.currency.tokenicon.converter
package com.tangem.core.ui.components.currency.icon.converter
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.extensions.getTintForTokenIcon
import com.tangem.core.ui.extensions.networkIconResId
import com.tangem.core.ui.extensions.tryGetBackgroundForTokenIcon
@ -9,11 +9,11 @@ import com.tangem.domain.tokens.model.CryptoCurrencyStatus
import com.tangem.utils.converter.Converter
/**
* Converts [CryptoCurrencyStatus] to [TokenIconState]
* Converts [CryptoCurrencyStatus] to [CurrencyIconState]
*/
class CryptoCurrencyToIconStateConverter : Converter<CryptoCurrencyStatus, TokenIconState> {
class CryptoCurrencyToIconStateConverter : Converter<CryptoCurrencyStatus, CurrencyIconState> {
override fun convert(value: CryptoCurrencyStatus): TokenIconState {
override fun convert(value: CryptoCurrencyStatus): CurrencyIconState {
return when (val currency = value.currency) {
is CryptoCurrency.Coin -> getIconStateForCoin(currency, value.value.isError)
is CryptoCurrency.Token -> getIconStateForToken(currency, value.value.isError)
@ -24,7 +24,7 @@ class CryptoCurrencyToIconStateConverter : Converter<CryptoCurrencyStatus, Token
value: CryptoCurrencyStatus,
forceGrayscale: Boolean,
showCustomTokenBadge: Boolean,
): TokenIconState {
): CurrencyIconState {
return when (val currency = value.currency) {
is CryptoCurrency.Coin -> getIconStateForCoin(
coin = currency,
@ -41,7 +41,7 @@ class CryptoCurrencyToIconStateConverter : Converter<CryptoCurrencyStatus, Token
}
}
fun convert(currency: CryptoCurrency): TokenIconState {
fun convert(currency: CryptoCurrency): CurrencyIconState {
return when (currency) {
is CryptoCurrency.Coin -> getIconStateForCoin(currency, isUnreachable = false)
is CryptoCurrency.Token -> getIconStateForToken(currency, isErrorStatus = false)
@ -53,8 +53,8 @@ class CryptoCurrencyToIconStateConverter : Converter<CryptoCurrencyStatus, Token
isUnreachable: Boolean,
showCustomBadge: Boolean = true,
forceGrayscale: Boolean = false,
): TokenIconState.CoinIcon {
return TokenIconState.CoinIcon(
): CurrencyIconState.CoinIcon {
return CurrencyIconState.CoinIcon(
url = coin.iconUrl,
fallbackResId = coin.networkIconResId,
isGrayscale = forceGrayscale || coin.network.isTestnet || isUnreachable,
@ -67,23 +67,23 @@ class CryptoCurrencyToIconStateConverter : Converter<CryptoCurrencyStatus, Token
isErrorStatus: Boolean,
showCustomBadge: Boolean = true,
forceGrayscale: Boolean = false,
): TokenIconState {
): CurrencyIconState {
val grayScale = forceGrayscale || token.network.isTestnet || isErrorStatus
val background = token.tryGetBackgroundForTokenIcon(grayScale)
val tint = getTintForTokenIcon(background)
return if (token.isCustom && token.iconUrl == null) {
TokenIconState.CustomTokenIcon(
CurrencyIconState.CustomTokenIcon(
tint = tint,
background = background,
networkBadgeIconResId = token.networkIconResId,
topBadgeIconResId = token.networkIconResId,
isGrayscale = grayScale,
showCustomBadge = showCustomBadge,
)
} else {
TokenIconState.TokenIcon(
CurrencyIconState.TokenIcon(
url = token.iconUrl,
networkBadgeIconResId = token.networkIconResId,
topBadgeIconResId = token.networkIconResId,
isGrayscale = grayScale,
fallbackTint = tint,
fallbackBackground = background,

View file

@ -12,13 +12,13 @@ import androidx.compose.ui.tooling.preview.Preview
import com.tangem.core.ui.R
import com.tangem.core.ui.components.atoms.text.EllipsisText
import com.tangem.core.ui.components.atoms.text.TextEllipsis
import com.tangem.core.ui.components.currency.tokenicon.TokenIcon
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIcon
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.components.inputrow.inner.DividerContainer
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.resolveReference
import com.tangem.core.ui.res.TangemThemePreview
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.res.TangemThemePreview
/**
* [Input Row Approx](https://www.figma.com/file/14ISV23YB1yVW1uNVwqrKv/Android?type=design&node-id=2207-810&mode=design&t=fM1ZU6zQF6g3CaTv-4)
@ -35,10 +35,10 @@ import com.tangem.core.ui.res.TangemTheme
@Suppress("LongParameterList")
@Composable
fun InputRowApprox(
leftIcon: TokenIconState,
leftIcon: CurrencyIconState,
leftTitle: TextReference,
leftSubtitle: TextReference,
rightIcon: TokenIconState,
rightIcon: CurrencyIconState,
rightTitle: TextReference,
rightSubtitle: TextReference,
modifier: Modifier = Modifier,
@ -86,7 +86,7 @@ fun InputRowApprox(
@Composable
private fun InputRowApproxItem(
iconState: TokenIconState,
iconState: CurrencyIconState,
title: TextReference,
subtitle: TextReference,
modifier: Modifier = Modifier,
@ -95,7 +95,7 @@ private fun InputRowApproxItem(
Row(
modifier = modifier,
) {
TokenIcon(
CurrencyIcon(
state = iconState,
modifier = Modifier
.size(TangemTheme.dimens.size36),
@ -131,11 +131,11 @@ private fun InputRowApproxPreview() {
TangemThemePreview {
Column {
InputRowApprox(
leftIcon = TokenIconState.Loading,
leftIcon = CurrencyIconState.Loading,
leftTitle = TextReference.Str("Left title USD"),
leftSubtitle = TextReference.Str("Left subtitle USD"),
leftTitleEllipsisOffset = 3,
rightIcon = TokenIconState.Loading,
rightIcon = CurrencyIconState.Loading,
rightTitle = TextReference.Str("Right title Right title Right title Right title Right title USD"),
rightSubtitle = TextReference.Str("Right subtitle Right subtitle Right subtitle USD"),
rightTitleEllipsisOffset = 3,
@ -143,11 +143,11 @@ private fun InputRowApproxPreview() {
.background(TangemTheme.colors.background.action),
)
InputRowApprox(
leftIcon = TokenIconState.Loading,
leftIcon = CurrencyIconState.Loading,
leftTitle = TextReference.Str("Left title Left title Left title Left title Left title USD"),
leftSubtitle = TextReference.Str("Left subtitle Left subtitle Left subtitle USD"),
leftTitleEllipsisOffset = 3,
rightIcon = TokenIconState.Loading,
rightIcon = CurrencyIconState.Loading,
rightTitle = TextReference.Str("Right title USD"),
rightSubtitle = TextReference.Str("Right subtitle USD"),
rightTitleEllipsisOffset = 3,

View file

@ -18,13 +18,13 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import com.tangem.core.ui.R
import com.tangem.core.ui.components.currency.icon.CurrencyIcon
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.components.inputrow.inner.DividerContainer
import com.tangem.core.ui.components.currency.tokenicon.TokenIcon
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.resolveReference
import com.tangem.core.ui.res.TangemThemePreview
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.res.TangemThemePreview
/**
* [Input Row Image](https://www.figma.com/file/14ISV23YB1yVW1uNVwqrKv/Android?type=design&node-id=2100-813&mode=design&t=IQ5lBJEkFGU4WSvi-4)
@ -32,7 +32,7 @@ import com.tangem.core.ui.res.TangemTheme
* @param title title reference
* @param subtitle subtitle reference
* @param caption caption reference
* @param tokenIconState token icon state [TokenIconState]
* @param tokenIconState token icon state [CurrencyIconState]
* @param modifier modifier
* @param titleColor title color
* @param subtitleColor subtitle color
@ -48,7 +48,7 @@ fun InputRowImage(
title: TextReference,
subtitle: TextReference,
caption: TextReference,
tokenIconState: TokenIconState,
tokenIconState: CurrencyIconState,
modifier: Modifier = Modifier,
titleColor: Color = TangemTheme.colors.text.secondary,
subtitleColor: Color = TangemTheme.colors.text.primary1,
@ -79,7 +79,7 @@ fun InputRowImage(
top = TangemTheme.dimens.spacing6,
),
) {
TokenIcon(
CurrencyIcon(
state = tokenIconState,
shouldDisplayNetwork = showNetworkIcon,
modifier = Modifier
@ -146,7 +146,7 @@ private data class InputRowImagePreviewData(
val title: TextReference,
val subtitle: TextReference,
val caption: TextReference,
val iconState: TokenIconState,
val iconState: CurrencyIconState,
val showDivider: Boolean,
val actionIconRes: Int?,
val showNetworkIcon: Boolean = false,
@ -160,7 +160,7 @@ private class InputRowImagePreviewDataProvider :
title = TextReference.Str("title"),
subtitle = TextReference.Str("subtitle"),
caption = TextReference.Str("caption"),
iconState = TokenIconState.Locked,
iconState = CurrencyIconState.Locked,
actionIconRes = null,
showDivider = false,
showNetworkIcon = false,
@ -169,7 +169,7 @@ private class InputRowImagePreviewDataProvider :
title = TextReference.Str("title"),
subtitle = TextReference.Str("subtitle"),
caption = TextReference.Str("caption"),
iconState = TokenIconState.Locked,
iconState = CurrencyIconState.Locked,
actionIconRes = R.drawable.ic_chevron_right_24,
showDivider = true,
showNetworkIcon = true,

View file

@ -8,7 +8,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import coil.compose.SubcomposeAsyncImage
import coil.request.ImageRequest
import com.tangem.core.ui.components.currency.tokenicon.LoadingIcon
import com.tangem.core.ui.components.currency.icon.LoadingIcon
import com.tangem.core.ui.res.TangemTheme
/**

View file

@ -2,13 +2,19 @@ package com.tangem.features.markets.ui
import android.content.res.Configuration
import androidx.compose.animation.Animatable
import androidx.compose.animation.core.*
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.snap
import androidx.compose.animation.core.tween
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.*
import androidx.compose.foundation.interaction.*
import androidx.compose.foundation.gestures.AnchoredDraggableState
import androidx.compose.foundation.gestures.DraggableAnchors
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.anchoredDraggable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsDraggedAsState
import androidx.compose.foundation.layout.*
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material3.Button
@ -30,7 +36,7 @@ import com.tangem.common.ui.charts.MarketChartMini
import com.tangem.common.ui.charts.state.MarketChartLook
import com.tangem.common.ui.charts.state.MarketChartRawData
import com.tangem.core.ui.components.*
import com.tangem.core.ui.components.currency.tokenicon.CoinIcon
import com.tangem.core.ui.components.currency.icon.CoinIcon
import com.tangem.core.ui.components.marketprice.PriceChangeInPercent
import com.tangem.core.ui.components.marketprice.PriceChangeType
import com.tangem.core.ui.res.LocalHapticManager
@ -41,7 +47,9 @@ import com.tangem.core.ui.windowsize.WindowSizeType
import com.tangem.features.markets.impl.R
import com.tangem.features.markets.ui.models.MarketsListItemModel
import com.tangem.features.markets.ui.preview.MarketChartListItemPreviewDataProvider
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.drop
import kotlinx.coroutines.launch
import kotlin.math.roundToInt
import kotlin.random.Random

View file

@ -3,7 +3,7 @@ package com.tangem.features.send.impl.presentation.state
import com.tangem.blockchain.common.TransactionData
import com.tangem.common.ui.amountScreen.converters.AmountStateConverter
import com.tangem.common.ui.amountScreen.models.AmountState
import com.tangem.core.ui.components.currency.tokenicon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.event.consumedEvent
import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.domain.tokens.model.CryptoCurrencyStatus

View file

@ -2,7 +2,7 @@ package com.tangem.features.staking.impl.presentation.state.transformers
import com.tangem.common.ui.amountScreen.converters.AmountStateConverter
import com.tangem.common.ui.amountScreen.models.AmountState
import com.tangem.core.ui.components.currency.tokenicon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.extensions.stringReference

View file

@ -1,6 +1,6 @@
package com.tangem.feature.swap.converters
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.extensions.*
import com.tangem.core.ui.utils.BigDecimalFormatter
import com.tangem.domain.appcurrency.model.AppCurrency
@ -11,8 +11,8 @@ import com.tangem.feature.swap.models.CurrenciesGroupWithFromCurrency
import com.tangem.feature.swap.models.SwapSelectTokenStateHolder
import com.tangem.feature.swap.models.TokenBalanceData
import com.tangem.feature.swap.models.TokenToSelectState
import com.tangem.utils.Provider
import com.tangem.feature.swap.presentation.R
import com.tangem.utils.Provider
import com.tangem.utils.converter.Converter
import kotlinx.collections.immutable.toImmutableList
@ -76,10 +76,10 @@ class TokensDataConverter(
)
}
private fun convertIcon(currency: CryptoCurrency, isAvailable: Boolean): TokenIconState {
private fun convertIcon(currency: CryptoCurrency, isAvailable: Boolean): CurrencyIconState {
return when (currency) {
is CryptoCurrency.Coin -> {
TokenIconState.CoinIcon(
CurrencyIconState.CoinIcon(
url = currency.iconUrl,
fallbackResId = currency.networkIconResId,
isGrayscale = !isAvailable,
@ -90,11 +90,11 @@ class TokensDataConverter(
val isGrayscale = currency.network.isTestnet
val background = currency.tryGetBackgroundForTokenIcon(isGrayscale)
val tint = getTintForTokenIcon(background)
TokenIconState.TokenIcon(
CurrencyIconState.TokenIcon(
url = currency.iconUrl,
isGrayscale = !isAvailable,
showCustomBadge = currency.isCustom,
networkBadgeIconResId = currency.networkIconResId,
topBadgeIconResId = currency.networkIconResId,
fallbackTint = tint,
fallbackBackground = background,
)

View file

@ -1,6 +1,6 @@
package com.tangem.feature.swap.models
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.extensions.TextReference
import kotlinx.collections.immutable.ImmutableList
@ -20,7 +20,7 @@ sealed class TokenToSelectState {
val id: String,
val name: String,
val symbol: String,
val tokenIcon: TokenIconState,
val tokenIcon: CurrencyIconState,
val available: Boolean = true,
val addedTokenBalanceData: TokenBalanceData? = null,
) : TokenToSelectState()

View file

@ -1,6 +1,6 @@
package com.tangem.feature.swap.models
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.extensions.TextReference
data class SwapSuccessStateHolder(
@ -16,8 +16,8 @@ data class SwapSuccessStateHolder(
val toTokenAmount: TextReference,
val fromTokenFiatAmount: TextReference,
val toTokenFiatAmount: TextReference,
val fromTokenIconState: TokenIconState?,
val toTokenIconState: TokenIconState?,
val fromTokenIconState: CurrencyIconState?,
val toTokenIconState: CurrencyIconState?,
val onExploreButtonClick: () -> Unit,
val onStatusButtonClick: () -> Unit,
)

View file

@ -4,7 +4,7 @@ import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.input.TextFieldValue
import com.tangem.common.ui.bottomsheets.state.*
import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfig
import com.tangem.core.ui.components.currency.tokenicon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.notifications.NotificationConfig
import com.tangem.core.ui.extensions.*
import com.tangem.core.ui.utils.BigDecimalFormatter

View file

@ -10,7 +10,7 @@ import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.material.Scaffold
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.ColorFilter
@ -18,16 +18,19 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import com.tangem.core.ui.components.*
import com.tangem.core.ui.components.SpacerH12
import com.tangem.core.ui.components.SpacerW2
import com.tangem.core.ui.components.appbar.ExpandableSearchView
import com.tangem.core.ui.components.currency.tokenicon.TokenIcon
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIcon
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.decorations.roundedShapeItemDecoration
import com.tangem.core.ui.extensions.resolveReference
import com.tangem.core.ui.extensions.stringReference
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.res.TangemThemePreview
import com.tangem.feature.swap.models.*
import com.tangem.feature.swap.models.SwapSelectTokenStateHolder
import com.tangem.feature.swap.models.TokenBalanceData
import com.tangem.feature.swap.models.TokenToSelectState
import com.tangem.feature.swap.presentation.R
import com.tangem.utils.Strings
import kotlinx.collections.immutable.ImmutableList
@ -212,7 +215,7 @@ private fun TokenItem(
),
verticalAlignment = Alignment.CenterVertically,
) {
TokenIcon(
CurrencyIcon(
state = token.tokenIcon,
shouldDisplayNetwork = true,
)
@ -280,7 +283,7 @@ private fun TokenItem(
}
private val token = TokenToSelectState.TokenToSelect(
tokenIcon = TokenIconState.CoinIcon(
tokenIcon = CurrencyIconState.CoinIcon(
url = "",
fallbackResId = 0,
isGrayscale = false,

View file

@ -12,7 +12,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import com.tangem.core.ui.components.*
import com.tangem.core.ui.components.appbar.AppBarWithBackButton
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.components.inputrow.InputRowBestRate
import com.tangem.core.ui.components.inputrow.InputRowDefault
import com.tangem.core.ui.components.inputrow.InputRowImage
@ -65,7 +65,7 @@ private fun SwapSuccessScreenContent(state: SwapSuccessStateHolder, padding: Pad
title = TextReference.Res(R.string.swapping_from_title),
subtitle = state.fromTokenAmount,
caption = state.fromTokenFiatAmount,
tokenIconState = state.fromTokenIconState ?: TokenIconState.Loading,
tokenIconState = state.fromTokenIconState ?: CurrencyIconState.Loading,
modifier = Modifier
.clip(TangemTheme.shapes.roundedCornersXMedium)
.background(TangemTheme.colors.background.action),
@ -76,7 +76,7 @@ private fun SwapSuccessScreenContent(state: SwapSuccessStateHolder, padding: Pad
title = TextReference.Res(R.string.swapping_to_title),
subtitle = state.toTokenAmount,
caption = state.toTokenFiatAmount,
tokenIconState = state.toTokenIconState ?: TokenIconState.Loading,
tokenIconState = state.toTokenIconState ?: CurrencyIconState.Loading,
modifier = Modifier
.clip(TangemTheme.shapes.roundedCornersXMedium)
.background(TangemTheme.colors.background.action),
@ -161,8 +161,8 @@ private val state = SwapSuccessStateHolder(
toTokenAmount = TextReference.Str("1 000 MATIC"),
fromTokenFiatAmount = TextReference.Str("1 000 $"),
toTokenFiatAmount = TextReference.Str("1 000 $"),
fromTokenIconState = TokenIconState.Loading,
toTokenIconState = TokenIconState.Loading,
fromTokenIconState = CurrencyIconState.Loading,
toTokenIconState = CurrencyIconState.Loading,
rate = TextReference.Str("1 000 DAI ~ 1 000 MATIC"),
onExploreButtonClick = {},
onStatusButtonClick = {},

View file

@ -1,7 +1,7 @@
package com.tangem.feature.tokendetails.presentation.tokendetails.state
import androidx.compose.runtime.Immutable
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.extensions.TextReference
import com.tangem.domain.tokens.model.CryptoCurrency
import com.tangem.feature.swap.domain.models.domain.ExchangeStatus
@ -23,11 +23,11 @@ internal data class SwapTransactionsState(
val toCryptoCurrency: CryptoCurrency,
val toCryptoAmount: String,
val toFiatAmount: String,
val toCurrencyIcon: TokenIconState,
val toCurrencyIcon: CurrencyIconState,
val fromCryptoCurrency: CryptoCurrency,
val fromCryptoAmount: String,
val fromFiatAmount: String,
val fromCurrencyIcon: TokenIconState,
val fromCurrencyIcon: CurrencyIconState,
val showProviderLink: Boolean,
val onClick: () -> Unit,
val onGoToProviderClick: (String) -> Unit,

View file

@ -1,7 +1,7 @@
package com.tangem.feature.tokendetails.presentation.tokendetails.state.factory
import com.tangem.core.analytics.api.AnalyticsEventHandler
import com.tangem.core.ui.components.currency.tokenicon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.utils.BigDecimalFormatter
import com.tangem.core.ui.utils.toDateFormatWithTodayYesterday

View file

@ -8,7 +8,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.stringResource
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.components.inputrow.InputRowApprox
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.resolveReference
@ -19,8 +19,8 @@ import com.tangem.features.tokendetails.impl.R
@Composable
internal fun ExchangeEstimate(
timestamp: TextReference,
fromTokenIconState: TokenIconState,
toTokenIconState: TokenIconState,
fromTokenIconState: CurrencyIconState,
toTokenIconState: CurrencyIconState,
fromCryptoAmount: TextReference,
fromCryptoSymbol: String,
toCryptoAmount: TextReference,

View file

@ -23,8 +23,8 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import androidx.constraintlayout.compose.*
import com.tangem.core.ui.components.atoms.text.EllipsisText
import com.tangem.core.ui.components.atoms.text.TextEllipsis
import com.tangem.core.ui.components.currency.tokenicon.TokenIcon
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIcon
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.res.TangemThemePreview
import com.tangem.feature.swap.domain.models.domain.ExchangeStatus
@ -72,8 +72,8 @@ internal fun LazyListScope.swapTransactionsItems(
@Composable
private fun ExchangeStatusItem(
providerName: String,
fromTokenIconState: TokenIconState,
toTokenIconState: TokenIconState,
fromTokenIconState: CurrencyIconState,
toTokenIconState: CurrencyIconState,
fromAmount: String,
fromSymbol: String,
toSymbol: String,
@ -102,7 +102,7 @@ private fun ExchangeStatusItem(
top.linkTo(parent.top)
},
)
TokenIcon(
CurrencyIcon(
state = fromTokenIconState,
shouldDisplayNetwork = false,
modifier = Modifier
@ -139,7 +139,7 @@ private fun ExchangeStatusItem(
bottom.linkTo(parent.bottom)
},
)
TokenIcon(
CurrencyIcon(
state = toTokenIconState,
shouldDisplayNetwork = false,
modifier = Modifier
@ -205,8 +205,8 @@ private fun ExchangeStatusItemPreview(
TangemThemePreview {
ExchangeStatusItem(
providerName = "ChangeNow",
fromTokenIconState = TokenIconState.Loading,
toTokenIconState = TokenIconState.Loading,
fromTokenIconState = CurrencyIconState.Loading,
toTokenIconState = CurrencyIconState.Loading,
fromAmount = amount,
fromSymbol = "USDT",
toSymbol = "USDT",

View file

@ -1,7 +1,7 @@
package com.tangem.feature.wallet.presentation.common
import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfig
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.components.marketprice.PriceChangeType
import com.tangem.core.ui.event.consumedEvent
import com.tangem.core.ui.extensions.TextReference
@ -67,7 +67,7 @@ internal object WalletPreviewData {
}
val coinIconState
get() = TokenIconState.CoinIcon(
get() = CurrencyIconState.CoinIcon(
url = null,
fallbackResId = R.drawable.img_polygon_22,
isGrayscale = false,
@ -75,9 +75,9 @@ internal object WalletPreviewData {
)
private val tokenIconState
get() = TokenIconState.TokenIcon(
get() = CurrencyIconState.TokenIcon(
url = null,
networkBadgeIconResId = R.drawable.img_polygon_22,
topBadgeIconResId = R.drawable.img_polygon_22,
fallbackTint = TangemColorPalette.Black,
fallbackBackground = TangemColorPalette.Meadow,
isGrayscale = false,
@ -85,10 +85,10 @@ internal object WalletPreviewData {
)
private val customTokenIconState
get() = TokenIconState.CustomTokenIcon(
get() = CurrencyIconState.CustomTokenIcon(
tint = TangemColorPalette.Black,
background = TangemColorPalette.Meadow,
networkBadgeIconResId = R.drawable.img_polygon_22,
topBadgeIconResId = R.drawable.img_polygon_22,
isGrayscale = false,
)

View file

@ -16,7 +16,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.datasource.CollectionPreviewParameterProvider
import androidx.compose.ui.unit.Constraints
import com.tangem.core.ui.components.currency.tokenicon.TokenIcon
import com.tangem.core.ui.components.currency.icon.CurrencyIcon
import com.tangem.core.ui.components.marketprice.PriceChangeType
import com.tangem.core.ui.extensions.rememberHapticFeedback
import com.tangem.core.ui.res.TangemTheme
@ -49,7 +49,7 @@ internal fun TokenItem(
.tokenClickable(state = state)
.background(color = TangemTheme.colors.background.primary),
) {
TokenIcon(
CurrencyIcon(
state = state.iconState,
modifier = Modifier
.layoutId(layoutId = LayoutId.ICON)

View file

@ -1,6 +1,6 @@
package com.tangem.feature.wallet.presentation.common.preview
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.components.marketprice.PriceChangeType
import com.tangem.core.ui.event.consumedEvent
import com.tangem.core.ui.extensions.TextReference
@ -16,7 +16,7 @@ import kotlinx.collections.immutable.persistentListOf
internal object WalletScreenPreviewData {
private val tokenItemState = TokenItemState.Content(
id = "1",
iconState = TokenIconState.Locked,
iconState = CurrencyIconState.Locked,
titleState = TokenItemState.TitleState.Content(text = "Bitcoin"),
fiatAmountState = TokenItemState.FiatAmountState.Content(text = "12 368,14 \$"),
cryptoAmountState = TokenItemState.CryptoAmountState.Content(text = "0,35853044 BTC"),
@ -56,7 +56,7 @@ internal object WalletScreenPreviewData {
WalletTokensListState.TokensListItemState.Token(
state = TokenItemState.Unreachable(
id = "3",
iconState = TokenIconState.Locked,
iconState = CurrencyIconState.Locked,
titleState = TokenItemState.TitleState.Content(text = "Polygon"),
onItemClick = {},
onItemLongClick = {},

View file

@ -1,7 +1,7 @@
package com.tangem.feature.wallet.presentation.common.state
import androidx.compose.runtime.Immutable
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.components.currency.icon.CurrencyIconState
import com.tangem.core.ui.components.marketprice.PriceChangeType
/** Token item state */
@ -10,7 +10,7 @@ internal sealed class TokenItemState {
abstract val id: String
abstract val iconState: TokenIconState
abstract val iconState: CurrencyIconState
abstract val titleState: TitleState
@ -23,7 +23,7 @@ internal sealed class TokenItemState {
/** Loading token state */
data class Loading(
override val id: String,
override val iconState: TokenIconState,
override val iconState: CurrencyIconState,
override val titleState: TitleState.Content,
) : TokenItemState() {
override val fiatAmountState: FiatAmountState = FiatAmountState.Loading
@ -33,7 +33,7 @@ internal sealed class TokenItemState {
/** Locked token state */
data class Locked(override val id: String) : TokenItemState() {
override val iconState: TokenIconState = TokenIconState.Locked
override val iconState: CurrencyIconState = CurrencyIconState.Locked
override val titleState: TitleState = TitleState.Locked
override val fiatAmountState: FiatAmountState = FiatAmountState.Locked
override val cryptoAmountState: CryptoAmountState = CryptoAmountState.Locked
@ -51,7 +51,7 @@ internal sealed class TokenItemState {
*/
data class Content(
override val id: String,
override val iconState: TokenIconState,
override val iconState: CurrencyIconState,
override val titleState: TitleState,
override val fiatAmountState: FiatAmountState,
override val cryptoAmountState: CryptoAmountState.Content,
@ -69,7 +69,7 @@ internal sealed class TokenItemState {
*/
data class Draggable(
override val id: String,
override val iconState: TokenIconState,
override val iconState: CurrencyIconState,
override val titleState: TitleState,
override val cryptoAmountState: CryptoAmountState,
) : TokenItemState() {
@ -88,7 +88,7 @@ internal sealed class TokenItemState {
*/
data class Unreachable(
override val id: String,
override val iconState: TokenIconState,
override val iconState: CurrencyIconState,
override val titleState: TitleState,
val onItemClick: () -> Unit,
val onItemLongClick: () -> Unit,
@ -108,7 +108,7 @@ internal sealed class TokenItemState {
*/
data class NoAddress(
override val id: String,
override val iconState: TokenIconState,
override val iconState: CurrencyIconState,
override val titleState: TitleState,
val onItemLongClick: () -> Unit,
) : TokenItemState() {

View file

@ -1,6 +1,6 @@
package com.tangem.feature.wallet.presentation.organizetokens.utils.converter.items
import com.tangem.core.ui.components.currency.tokenicon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.utils.BigDecimalFormatter
import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.domain.tokens.model.CryptoCurrencyStatus

View file

@ -1,6 +1,6 @@
package com.tangem.feature.wallet.presentation.wallet.state.transformers.converter
import com.tangem.core.ui.components.currency.tokenicon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.currency.icon.converter.CryptoCurrencyToIconStateConverter
import com.tangem.core.ui.components.marketprice.PriceChangeType
import com.tangem.core.ui.components.marketprice.utils.PriceChangeConverter
import com.tangem.core.ui.utils.BigDecimalFormatter