Updated on 2026-08-14
This commit is contained in:
parent
797d11bd8c
commit
99b6c9a533
4 changed files with 9 additions and 9 deletions
|
|
@ -59,7 +59,7 @@ fun CollapsedCurrencyItem(
|
|||
.align(Alignment.CenterVertically)
|
||||
) {
|
||||
Text(
|
||||
text = currency.name,
|
||||
text = currency.fullName,
|
||||
fontSize = 17.sp,
|
||||
fontWeight = FontWeight.Normal,
|
||||
color = Color(0xFF1C1C1E),
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import androidx.compose.ui.unit.sp
|
|||
import coil.compose.SubcomposeAsyncImage
|
||||
import coil.request.ImageRequest
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.domain.common.extensions.fromNetworkId
|
||||
import com.tangem.tap.domain.tokens.Currency
|
||||
import com.tangem.tap.features.tokens.redux.ContractAddress
|
||||
import com.tangem.tap.features.tokens.redux.TokenWithBlockchain
|
||||
|
|
@ -65,7 +64,7 @@ fun ExpandedCurrencyItem(
|
|||
.align(Alignment.CenterVertically)
|
||||
) {
|
||||
Text(
|
||||
text = currency.name,
|
||||
text = currency.fullName,
|
||||
fontSize = 17.sp,
|
||||
fontWeight = FontWeight.Normal,
|
||||
color = Color(0xFF1C1C1E),
|
||||
|
|
@ -87,9 +86,7 @@ fun ExpandedCurrencyItem(
|
|||
)
|
||||
}
|
||||
|
||||
val blockchains = currency.contracts?.map { it.blockchain } ?: listOfNotNull(
|
||||
Blockchain.fromNetworkId(currency.id)
|
||||
)
|
||||
val blockchains = currency.contracts.map { it.blockchain }
|
||||
|
||||
Row {
|
||||
Box(
|
||||
|
|
@ -134,7 +131,7 @@ fun ExpandedCurrencyItem(
|
|||
.padding(top = 6.dp),
|
||||
) {
|
||||
blockchains.map { blockchain ->
|
||||
val contract = currency.contracts?.firstOrNull { it.blockchain == blockchain }
|
||||
val contract = currency.contracts.firstOrNull { it.blockchain == blockchain }
|
||||
val added = if (contract != null && contract.address != currency.symbol) {
|
||||
addedTokens.map { it.token.contractAddress }.contains(contract.address)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -66,4 +66,7 @@ fun ListOfCurrencies(
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val Currency.fullName: String
|
||||
get() = "${this.name} (${this.symbol})"
|
||||
|
|
@ -46,7 +46,7 @@ fun NetworkItem(
|
|||
.combinedClickable(
|
||||
enabled = allowToAdd,
|
||||
onLongClick = {
|
||||
if (contract != null) onNetworkItemClicked(contract.address)
|
||||
if (!isBlockchain) onNetworkItemClicked(contract!!.address)
|
||||
},
|
||||
onClick = {},
|
||||
indication = null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue