Updated on 2026-08-14
This commit is contained in:
parent
f9369de36a
commit
448a472832
7 changed files with 164 additions and 40 deletions
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue