Updated on 2026-08-14
This commit is contained in:
commit
cab885e39f
16 changed files with 469 additions and 12 deletions
|
|
@ -22,4 +22,6 @@ interface YieldSupplyTransactionRepository {
|
|||
yieldSupplyStatus: YieldSupplyStatus,
|
||||
fee: Fee?,
|
||||
): TransactionData.Uncompiled
|
||||
|
||||
suspend fun getYieldContractAddress(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency): String?
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.tangem.domain.yield.supply.usecase
|
||||
|
||||
import arrow.core.Either
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.yield.supply.YieldSupplyTransactionRepository
|
||||
|
||||
class YieldSupplyGetContractAddressUseCase(
|
||||
private val yieldSupplyTransactionRepository: YieldSupplyTransactionRepository,
|
||||
) {
|
||||
|
||||
suspend operator fun invoke(
|
||||
userWalletId: UserWalletId,
|
||||
cryptoCurrency: CryptoCurrency.Token,
|
||||
): Either<Throwable, String?> = Either.catch {
|
||||
yieldSupplyTransactionRepository.getYieldContractAddress(
|
||||
userWalletId = userWalletId,
|
||||
cryptoCurrency = cryptoCurrency,
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue