Updated on 2026-08-14
This commit is contained in:
commit
22c5020656
5 changed files with 17 additions and 10 deletions
|
|
@ -606,7 +606,7 @@ internal class AddCustomTokenViewModel @Inject constructor(
|
|||
val savedTokenId = if (token.isCustom) null else token.id.rawCurrencyId
|
||||
|
||||
val sameId = foundToken?.id == savedTokenId
|
||||
val sameAddress = contractAddress == token.contractAddress
|
||||
val sameAddress = contractAddress.equals(token.contractAddress, ignoreCase = true)
|
||||
val sameBlockchain = networkId == token.network.id.value
|
||||
val isSameDerivationPath = getDerivationPath()?.rawPath == token.network.derivationPath.value
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ package com.tangem.core.ui.components.bottomsheets.tokenreceive
|
|||
|
||||
import android.widget.Toast
|
||||
import androidx.compose.animation.animateColorAsState
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.*
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.LazyRow
|
||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||
|
|
@ -43,6 +41,7 @@ private fun TokenReceiveBottomSheetContent(content: TokenReceiveBottomSheetConfi
|
|||
var selectedAddress by remember { mutableStateOf(content.addresses.first()) }
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.verticalScroll(state = rememberScrollState())
|
||||
.padding(
|
||||
start = TangemTheme.dimens.spacing24,
|
||||
top = TangemTheme.dimens.spacing24,
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ private fun darkThemeColors(): TangemColors {
|
|||
attention = TangemColorPalette.Mustard,
|
||||
),
|
||||
button = TangemColors.Button(
|
||||
primary = TangemColorPalette.Light1,
|
||||
primary = TangemColorPalette.Light4,
|
||||
secondary = TangemColorPalette.Dark5,
|
||||
disabled = TangemColorPalette.Dark5,
|
||||
positiveDisabled = TangemColorPalette.DarkGreen,
|
||||
|
|
|
|||
|
|
@ -45,13 +45,18 @@ internal fun TokenItem(
|
|||
.tokenClickable(state = state)
|
||||
.background(color = TangemTheme.colors.background.primary),
|
||||
) {
|
||||
TokenIcon(state = state.iconState, modifier = Modifier.layoutId(layoutId = LayoutId.ICON))
|
||||
TokenIcon(
|
||||
state = state.iconState,
|
||||
modifier = Modifier
|
||||
.layoutId(layoutId = LayoutId.ICON)
|
||||
.padding(end = TangemTheme.dimens.spacing8),
|
||||
)
|
||||
|
||||
TokenTitle(
|
||||
state = state.titleState,
|
||||
modifier = Modifier
|
||||
.layoutId(layoutId = LayoutId.TITLE)
|
||||
.padding(horizontal = TangemTheme.dimens.spacing8)
|
||||
.padding(end = TangemTheme.dimens.spacing8)
|
||||
.padding(bottom = betweenRowsMargin),
|
||||
)
|
||||
|
||||
|
|
@ -67,7 +72,7 @@ internal fun TokenItem(
|
|||
state = state.cryptoPriceState,
|
||||
modifier = Modifier
|
||||
.layoutId(layoutId = LayoutId.CRYPTO_PRICE)
|
||||
.padding(horizontal = TangemTheme.dimens.spacing8),
|
||||
.padding(end = TangemTheme.dimens.spacing8),
|
||||
)
|
||||
|
||||
TokenCryptoAmount(
|
||||
|
|
@ -233,7 +238,10 @@ private fun CustomContainer(state: TokenItemState, modifier: Modifier = Modifier
|
|||
)
|
||||
|
||||
cryptoAmount?.placeRelative(
|
||||
x = layoutWidth - cryptoAmount.width - layoutPadding,
|
||||
x = when (state) {
|
||||
is TokenItemState.Draggable -> layoutPadding + icon.width
|
||||
else -> layoutWidth - cryptoAmount.width - layoutPadding
|
||||
},
|
||||
y = layoutHeight - cryptoAmount.height - layoutPadding,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ spr-client = "3.6.2"
|
|||
# endregion Other libraries
|
||||
|
||||
# region Tangem
|
||||
tangemBlockchainSdk = "release-app_5.2-388"
|
||||
tangemBlockchainSdk = "release-app_5.2-389"
|
||||
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
||||
tangemCardSdk = "release-app_5.2-311"
|
||||
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue