Updated on 2026-08-14

This commit is contained in:
Tangem 2024-10-04 12:13:45 +04:00
parent 25a8807f60
commit 7467c8336b
10 changed files with 149 additions and 23 deletions

View file

@ -0,0 +1,18 @@
package com.tangem.domain.markets
import arrow.core.Either
import com.tangem.domain.markets.repositories.MarketsTokenRepository
/**
* Get token exchanges use case
*
* @property marketsTokenRepository markets token repository
*/
class GetTokenExchangesUseCase(
private val marketsTokenRepository: MarketsTokenRepository,
) {
suspend operator fun invoke(tokenId: String): Either<Throwable, List<TokenMarketExchange>> {
return Either.catch { marketsTokenRepository.getTokenExchanges(tokenId = tokenId) }
}
}