Updated on 2026-08-14
This commit is contained in:
parent
a8cd6f1d8b
commit
6f47c78b23
11 changed files with 62 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue