Updated on 2026-08-14

This commit is contained in:
Tangem 2025-12-03 13:42:03 +04:00
parent f9369de36a
commit 448a472832
7 changed files with 164 additions and 40 deletions

View file

@ -0,0 +1,24 @@
package com.tangem.domain.yield.supply.usecase
import arrow.core.Either
import com.tangem.domain.models.currency.CryptoCurrencyStatus
import com.tangem.domain.models.wallet.UserWalletId
import com.tangem.domain.yield.supply.YieldSupplyRepository
import com.tangem.domain.yield.supply.models.YieldSupplyEnterStatus
class YieldSupplyEnterStatusUseCase(
private val yieldSupplyRepository: YieldSupplyRepository,
) {
operator fun invoke(
userWalletId: UserWalletId,
cryptoCurrencyStatus: CryptoCurrencyStatus,
): Either<Throwable, YieldSupplyEnterStatus?> {
return Either.catch {
yieldSupplyRepository.getTokenProtocolStatus(
userWalletId,
cryptoCurrencyStatus.currency,
)
}
}
}