From 22db5505337102cb722b124ebd021afe78fc30c3 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 25 Oct 2023 18:20:31 +0800 Subject: [PATCH] Updated on 2026-08-14 --- .../core/ui/components/marketprice/MarketPriceBlock.kt | 6 +----- .../factory/WalletSingleCurrencyLoadedBalanceConverter.kt | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/marketprice/MarketPriceBlock.kt b/core/ui/src/main/java/com/tangem/core/ui/components/marketprice/MarketPriceBlock.kt index 40cb551701..3ff8fbb6fd 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/components/marketprice/MarketPriceBlock.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/components/marketprice/MarketPriceBlock.kt @@ -1,7 +1,6 @@ package com.tangem.core.ui.components.marketprice import androidx.compose.animation.AnimatedContent -import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.foundation.background import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape @@ -36,7 +35,7 @@ import com.tangem.core.ui.utils.BigDecimalFormatter */ @Composable fun MarketPriceBlock(state: MarketPriceBlockState, modifier: Modifier = Modifier) { - var rootWidth by remember { mutableStateOf(value = 0) } + var rootWidth by remember { mutableIntStateOf(value = 0) } Column( modifier = modifier @@ -66,7 +65,6 @@ private fun Title(currencyName: String) { ) } -@OptIn(ExperimentalAnimationApi::class) @Composable private fun Content(state: MarketPriceBlockState, rootWidth: Int) { AnimatedContent(targetState = state, label = "Update the content") { marketPriceBlockState -> @@ -96,7 +94,6 @@ private fun PriceContent(state: MarketPriceBlockState, priceWidthDp: Dp) { } } -@OptIn(ExperimentalAnimationApi::class) @Composable private fun PriceBlock(state: MarketPriceBlockState, priceWidthDp: Dp) { val priceModifier = Modifier.widthIn(max = priceWidthDp) @@ -128,7 +125,6 @@ private fun Price(price: String, modifier: Modifier = Modifier) { ) } -@OptIn(ExperimentalAnimationApi::class) @Composable private fun PriceChangeInPercent(config: PriceChangeState.Content) { AnimatedContent(targetState = config.type, label = "Update price change") { type -> diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/factory/WalletSingleCurrencyLoadedBalanceConverter.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/factory/WalletSingleCurrencyLoadedBalanceConverter.kt index a44b929150..9d4b7bd566 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/factory/WalletSingleCurrencyLoadedBalanceConverter.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/factory/WalletSingleCurrencyLoadedBalanceConverter.kt @@ -56,7 +56,7 @@ internal class WalletSingleCurrencyLoadedBalanceConverter( private fun getMarketPriceState(status: CryptoCurrencyStatus.Status, currencyName: String): MarketPriceBlockState { return when (status) { - is CryptoCurrencyStatus.NoQuote, + is CryptoCurrencyStatus.NoQuote -> MarketPriceBlockState.Error(currencyName) is CryptoCurrencyStatus.Loaded, is CryptoCurrencyStatus.NoAmount, -> MarketPriceBlockState.Content(