diff --git a/core/ui/src/main/java/com/tangem/core/ui/ds/row/token/TangemTokenRow.kt b/core/ui/src/main/java/com/tangem/core/ui/ds/row/token/TangemTokenRow.kt index 67d8918c7f..c5950b2f4a 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/ds/row/token/TangemTokenRow.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/ds/row/token/TangemTokenRow.kt @@ -17,6 +17,7 @@ import com.tangem.core.ui.ds.row.TangemRowContainer import com.tangem.core.ui.ds.row.TangemRowLayoutId import com.tangem.core.ui.ds.row.internal.TangemRowTail import com.tangem.core.ui.ds.row.token.internal.* +import com.tangem.core.ui.extensions.clickableSingle import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemThemePreviewRedesign import com.tangem.core.ui.test.TokenElementsTestTags @@ -131,6 +132,8 @@ fun TangemTokenRow( titleComponent: @Composable (Modifier) -> Unit, ) { TangemRowContainer( + modifier = modifier + .clickableSingle(enabled = tokenRowUM.onItemClick != null, onClick = { tokenRowUM.onItemClick?.invoke() }), content = { headComponent( Modifier @@ -193,7 +196,6 @@ fun TangemTokenRow( .testTag(tag = TokenElementsTestTags.TOKEN_NON_FIAT_BLOCK), ) }, - modifier = modifier, ) } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/WalletTokensListUMConverter.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/WalletTokensListUMConverter.kt index aa24a27e24..58e67d0012 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/WalletTokensListUMConverter.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/converter/WalletTokensListUMConverter.kt @@ -81,8 +81,10 @@ internal class WalletTokensListUMConverter( .asSequence() .flatMap { accountStatus -> if (isAccountsModeEnabled) { - val isCollapsable = accountStatus.tokenList.flattenCurrencies().isNotEmpty() - val isExpanded = expandedAccounts.contains(accountStatus.account.accountId) + val currencies = accountStatus.tokenList.flattenCurrencies() + val isCollapsable = currencies.isNotEmpty() + val isExpanded = + currencies.isEmpty() || expandedAccounts.contains(accountStatus.account.accountId) sequenceOf( TokensListItemUM2.Portfolio( tokenRowUM = accountRowConverter.convert(accountStatus),