Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-10 17:02:30 +05:00
parent a8cd6f1d8b
commit 6f47c78b23
11 changed files with 62 additions and 2 deletions

View file

@ -72,6 +72,7 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import kotlinx.coroutines.withTimeoutOrNull
import timber.log.Timber
import java.math.BigDecimal
import kotlin.time.Duration.Companion.seconds
@Suppress("LargeClass", "LongParameterList", "TooManyFunctions")
@ -662,6 +663,14 @@ internal class DefaultStakingRepository(
}
}
override fun getActionRequirementAmount(integrationId: String, stakingActionType: StakingActionType): BigDecimal? {
return when {
stakingIdFactory.isPolygonIntegrationId(integrationId) &&
stakingActionType == StakingActionType.CLAIM_REWARDS -> BigDecimal.ONE
else -> null
}
}
private suspend fun createActionRequestBody(
userWalletId: UserWalletId,
network: Network,

View file

@ -35,6 +35,8 @@ internal class StakingIdFactory @Inject constructor(
return integrationIdMap[integrationKey]
}
fun isPolygonIntegrationId(integrationId: String): Boolean = integrationId == ETHEREUM_POLYGON_INTEGRATION_ID
@Suppress("UnusedPrivateMember", "unused")
companion object {