Updated on 2026-08-14

This commit is contained in:
Tangem 2025-04-23 14:31:44 +05:00
parent c300a5eaf3
commit d99c4e1405
15 changed files with 316 additions and 56 deletions

View file

@ -0,0 +1,16 @@
package com.tangem.domain.nft
import com.tangem.domain.nft.repository.NFTRepository
import com.tangem.domain.tokens.repository.CurrenciesRepository
import com.tangem.domain.wallets.models.UserWalletId
class RefreshAllNFTUseCase(
private val currenciesRepository: CurrenciesRepository,
private val nftRepository: NFTRepository,
) {
suspend operator fun invoke(userWalletId: UserWalletId) {
val currencies = currenciesRepository.getMultiCurrencyWalletCurrenciesSync(userWalletId)
nftRepository.refreshAll(userWalletId, currencies.map { it.network }.distinct())
}
}

View file

@ -14,6 +14,8 @@ interface NFTRepository {
suspend fun refreshAssets(userWalletId: UserWalletId, network: Network, collectionId: NFTCollection.Identifier)
suspend fun refreshAll(userWalletId: UserWalletId, networks: List<Network>)
suspend fun isNFTSupported(network: Network): Boolean
suspend fun getNFTExploreUrl(network: Network, assetIdentifier: NFTAsset.Identifier): String?