Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-23 19:27:33 +05:00
commit cab885e39f
16 changed files with 469 additions and 12 deletions

View file

@ -22,4 +22,6 @@ interface YieldSupplyTransactionRepository {
yieldSupplyStatus: YieldSupplyStatus,
fee: Fee?,
): TransactionData.Uncompiled
suspend fun getYieldContractAddress(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency): String?
}

View file

@ -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,
)
}
}