From ee9f8a27b78e3732ebf35cfc9c48b43b8055ae1c Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 28 Jan 2026 16:07:23 +0700 Subject: [PATCH] Updated on 2026-08-14 --- .../portfolio/impl/model/NewMarketsPortfolioDelegate.kt | 6 +++++- .../portfolio/impl/model/NewMarketsPortfolioDelegate.kt | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/impl/model/NewMarketsPortfolioDelegate.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/impl/model/NewMarketsPortfolioDelegate.kt index 02e0ec8a02..51bb3b58a7 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/impl/model/NewMarketsPortfolioDelegate.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/market/details/portfolio/impl/model/NewMarketsPortfolioDelegate.kt @@ -1,5 +1,6 @@ package com.tangem.features.feed.components.market.details.portfolio.impl.model +import com.tangem.blockchainsdk.compatibility.getTokenIdIfL2Network import com.tangem.common.ui.account.AccountTitleUM import com.tangem.common.ui.account.toUM import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfig @@ -185,7 +186,10 @@ internal class NewMarketsPortfolioDelegate @AssistedInject constructor( private fun AccountStatusList.filterByRawID(): List { fun AccountStatus.filterByRawID(): List = when (this) { is AccountStatus.CryptoPortfolio -> this.tokenList.flattenCurrencies() - .filter { status -> status.currency.id.rawCurrencyId == currencyRawId } + .filter { status -> + val currencyId = status.currency.id.rawCurrencyId ?: return@filter false + getTokenIdIfL2Network(currencyId.value) == currencyRawId.value + } } return accountStatuses.map { accountStatus -> AccountWithAdded( diff --git a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/model/NewMarketsPortfolioDelegate.kt b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/model/NewMarketsPortfolioDelegate.kt index eecadfc1a5..a01af9079d 100644 --- a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/model/NewMarketsPortfolioDelegate.kt +++ b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/model/NewMarketsPortfolioDelegate.kt @@ -1,5 +1,6 @@ package com.tangem.features.markets.portfolio.impl.model +import com.tangem.blockchainsdk.compatibility.getTokenIdIfL2Network import com.tangem.common.ui.account.AccountTitleUM import com.tangem.common.ui.account.toUM import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfig @@ -186,7 +187,10 @@ internal class NewMarketsPortfolioDelegate @AssistedInject constructor( private fun AccountStatusList.filterByRawID(): List { fun AccountStatus.filterByRawID(): List = when (this) { is AccountStatus.CryptoPortfolio -> this.tokenList.flattenCurrencies() - .filter { status -> status.currency.id.rawCurrencyId == currencyRawId } + .filter { status -> + val currencyId = status.currency.id.rawCurrencyId ?: return@filter false + getTokenIdIfL2Network(currencyId.value) == currencyRawId.value + } } return accountStatuses.map { accountStatus -> AccountWithAdded(