Updated on 2026-08-14
This commit is contained in:
parent
ef2b607490
commit
05cd350133
1 changed files with 6 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ package com.tangem.tap.features.tokens.impl.data.converters
|
|||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.datasource.api.tangemTech.models.CoinsResponse
|
||||
import com.tangem.domain.common.extensions.fromNetworkId
|
||||
import com.tangem.domain.common.extensions.toNetworkId
|
||||
import com.tangem.tap.features.tokens.impl.domain.models.Token
|
||||
import com.tangem.utils.converter.Converter
|
||||
|
||||
|
|
@ -25,7 +26,11 @@ internal object CoinsResponseConverter : Converter<CoinsResponse, List<Token>> {
|
|||
networks = token.networks.mapNotNull { network ->
|
||||
val blockchain = Blockchain.fromNetworkId(network.networkId) ?: return@mapNotNull null
|
||||
|
||||
if (!blockchain.canHandleTokens()) return@mapNotNull null
|
||||
if (network.networkId != blockchain.toNetworkId() &&
|
||||
!blockchain.canHandleTokens()
|
||||
) {
|
||||
return@mapNotNull null
|
||||
}
|
||||
|
||||
Token.Network(
|
||||
id = network.networkId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue