Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-04 14:09:34 +04:00
parent 507b608807
commit 768422ea7c
34 changed files with 661 additions and 80 deletions

View file

@ -1,18 +0,0 @@
package com.tangem.domain.pay
import arrow.core.Either
import com.tangem.core.error.UniversalError
import com.tangem.domain.models.ReceiveAddressModel
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.wallet.UserWalletId
interface DataForReceiveFactory {
fun getDataForReceive(depositAddress: String, chainId: Int): Either<UniversalError, DataForReceive>
}
data class DataForReceive(
val walletId: UserWalletId,
val currency: CryptoCurrency,
val receiveAddress: List<ReceiveAddressModel>,
)

View file

@ -0,0 +1,27 @@
package com.tangem.domain.pay
import arrow.core.Either
import com.tangem.core.error.UniversalError
import com.tangem.domain.models.ReceiveAddressModel
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.wallet.UserWalletId
import java.math.BigDecimal
interface TangemPayTopUpDataFactory {
fun create(
depositAddress: String,
chainId: Int,
cryptoBalance: BigDecimal,
fiatBalance: BigDecimal,
): Either<UniversalError, TangemPayTopUpData>
}
data class TangemPayTopUpData(
val walletId: UserWalletId,
val currency: CryptoCurrency,
val cryptoBalance: BigDecimal,
val fiatBalance: BigDecimal,
val depositAddress: String,
val receiveAddress: List<ReceiveAddressModel>,
)

View file

@ -0,0 +1,15 @@
package com.tangem.domain.tangempay
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.currency.CryptoCurrencyStatus
import java.math.BigDecimal
interface GetTangemPayCurrencyStatusUseCase {
suspend operator fun invoke(
currency: CryptoCurrency,
cryptoAmount: BigDecimal,
fiatAmount: BigDecimal,
depositAddress: String,
): CryptoCurrencyStatus?
}