Updated on 2026-08-14
This commit is contained in:
parent
a667fcc955
commit
db6157cae4
20 changed files with 435 additions and 500 deletions
|
|
@ -6,7 +6,7 @@ import com.tangem.blockchain.common.Blockchain
|
|||
import com.tangem.blockchainsdk.utils.ExcludedBlockchains
|
||||
import com.tangem.blockchainsdk.utils.fromNetworkId
|
||||
import com.tangem.data.common.currency.CryptoCurrencyFactory
|
||||
import com.tangem.data.common.currency.getNetwork
|
||||
import com.tangem.data.common.network.NetworkFactory
|
||||
import com.tangem.datasource.local.nft.NFTPersistenceStore
|
||||
import com.tangem.datasource.local.nft.NFTPersistenceStoreFactory
|
||||
import com.tangem.datasource.local.nft.NFTRuntimeStore
|
||||
|
|
@ -46,9 +46,10 @@ internal class DefaultNFTRepository @Inject constructor(
|
|||
private val nftRuntimeStoreFactory: NFTRuntimeStoreFactory,
|
||||
private val walletManagersFacade: WalletManagersFacade,
|
||||
private val dispatchers: CoroutineDispatcherProvider,
|
||||
private val excludedBlockchains: ExcludedBlockchains,
|
||||
private val userWalletsStore: UserWalletsStore,
|
||||
private val nftFeatureToggles: NFTFeatureToggles,
|
||||
private val networkFactory: NetworkFactory,
|
||||
excludedBlockchains: ExcludedBlockchains,
|
||||
resources: Resources,
|
||||
) : NFTRepository {
|
||||
|
||||
|
|
@ -200,11 +201,10 @@ internal class DefaultNFTRepository @Inject constructor(
|
|||
.entries
|
||||
.filter { it.canHandleNFTs() && !it.isTestnet() }
|
||||
.mapNotNull {
|
||||
getNetwork(
|
||||
networkFactory.create(
|
||||
blockchain = it,
|
||||
extraDerivationPath = null,
|
||||
scanResponse = userWallet.scanResponse,
|
||||
excludedBlockchains = excludedBlockchains,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.tangem.data.nft.di
|
|||
|
||||
import android.content.Context
|
||||
import com.tangem.blockchainsdk.utils.ExcludedBlockchains
|
||||
import com.tangem.data.common.network.NetworkFactory
|
||||
import com.tangem.data.nft.DefaultNFTRepository
|
||||
import com.tangem.datasource.local.nft.NFTPersistenceStoreFactory
|
||||
import com.tangem.datasource.local.nft.NFTRuntimeStoreFactory
|
||||
|
|
@ -32,6 +33,7 @@ internal object NFTDataModule {
|
|||
excludedBlockchains: ExcludedBlockchains,
|
||||
userWalletsStore: UserWalletsStore,
|
||||
nftFeatureToggles: NFTFeatureToggles,
|
||||
networkFactory: NetworkFactory,
|
||||
): NFTRepository = DefaultNFTRepository(
|
||||
nftPersistenceStoreFactory = nftPersistenceStoreFactory,
|
||||
nftRuntimeStoreFactory = nftRuntimeStoreFactory,
|
||||
|
|
@ -40,6 +42,7 @@ internal object NFTDataModule {
|
|||
excludedBlockchains = excludedBlockchains,
|
||||
userWalletsStore = userWalletsStore,
|
||||
nftFeatureToggles = nftFeatureToggles,
|
||||
networkFactory = networkFactory,
|
||||
resources = context.resources,
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue