Updated on 2026-08-14
This commit is contained in:
parent
e2403d5f5f
commit
1fbf2debcd
35 changed files with 169 additions and 156 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue