Updated on 2026-08-14
This commit is contained in:
parent
25a8807f60
commit
7467c8336b
10 changed files with 149 additions and 23 deletions
|
|
@ -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) }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue