Updated on 2026-08-14

This commit is contained in:
Tangem 2025-10-17 14:26:57 +05:00
parent cc037ed347
commit 56b509927c
8 changed files with 35 additions and 10 deletions

View file

@ -114,6 +114,7 @@ internal class DefaultRampManager(
userWalletId: UserWalletId,
cryptoCurrencyStatus: CryptoCurrencyStatus,
): ScenarioUnavailabilityReason {
val yieldSupplyStatus = cryptoCurrencyStatus.value.yieldSupplyStatus
return when {
cryptoCurrencyStatus.value.amount.isNullOrZero() -> {
ScenarioUnavailabilityReason.EmptyBalance(ScenarioUnavailabilityReason.WithdrawalScenario.SEND)
@ -127,6 +128,9 @@ internal class DefaultRampManager(
networkName = cryptoCurrencyStatus.currency.network.name,
)
}
yieldSupplyStatus?.isAllowedToSpend == false && yieldSupplyStatus.isActive -> {
ScenarioUnavailabilityReason.YieldSupplyApprovalRequired
}
else -> ScenarioUnavailabilityReason.None
}
}