Updated on 2026-08-14
This commit is contained in:
parent
0bd68de818
commit
546a9decb0
7 changed files with 42 additions and 20 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package com.tangem.domain.nft
|
||||
|
||||
import arrow.core.Either
|
||||
import com.tangem.domain.nft.repository.NFTRepository
|
||||
import com.tangem.domain.tokens.repository.CurrenciesRepository
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
|
|
@ -9,7 +10,7 @@ class RefreshAllNFTUseCase(
|
|||
private val nftRepository: NFTRepository,
|
||||
) {
|
||||
|
||||
suspend operator fun invoke(userWalletId: UserWalletId) {
|
||||
suspend operator fun invoke(userWalletId: UserWalletId): Either<Throwable, Unit> = Either.catch {
|
||||
val currencies = currenciesRepository.getMultiCurrencyWalletCurrenciesSync(userWalletId)
|
||||
nftRepository.refreshAll(userWalletId, currencies.map { it.network }.distinct())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue