Updated on 2026-08-14

This commit is contained in:
Tangem 2026-01-13 13:14:21 +02:00
parent 38aaf7fd56
commit 7e1fcc18d1
9 changed files with 71 additions and 14 deletions

View file

@ -73,6 +73,13 @@ class P2PEthPoolIntegration(
override val rewardClaiming: RewardClaiming = RewardClaiming.AUTO
// Legal URLs
override val legalUrls: StakingLegalUrls = StakingLegalUrls(
termsOfServiceUrl = TERMS_OF_SERVICE_URL,
privacyPolicyUrl = PRIVACY_POLICY_URL,
)
override fun getCurrentToken(rawCurrencyId: CryptoCurrency.RawID?): YieldToken = token
private fun calculateMaximumStakeAmount(): BigDecimal? {
@ -88,5 +95,8 @@ class P2PEthPoolIntegration(
private const val MIN_COOLDOWN_DAYS = 1
private const val MAX_COOLDOWN_DAYS = 4
private val DEFAULT_MINIMUM_STAKE = BigDecimal("0.01")
private const val TERMS_OF_SERVICE_URL = "https://www.p2p.org/terms-of-use"
private const val PRIVACY_POLICY_URL = "https://www.p2p.org/privacy-policy"
}
}

View file

@ -59,6 +59,13 @@ class StakeKitIntegration(
override val rewardClaiming: RewardClaiming = yield.metadata.rewardClaiming.toRewardClaiming()
// Legal URLs
override val legalUrls: StakingLegalUrls = StakingLegalUrls(
termsOfServiceUrl = TERMS_OF_SERVICE_URL,
privacyPolicyUrl = PRIVACY_POLICY_URL,
)
// Basic
override fun getCurrentToken(rawCurrencyId: CryptoCurrency.RawID?): YieldToken =
@ -98,4 +105,9 @@ class StakeKitIntegration(
Yield.Metadata.RewardClaiming.UNKNOWN -> RewardClaiming.UNKNOWN
}
}
companion object {
private const val TERMS_OF_SERVICE_URL = "https://docs.yield.xyz/docs/terms-of-use"
private const val PRIVACY_POLICY_URL = "https://docs.yield.xyz/docs/privacy-policy"
}
}

View file

@ -51,6 +51,10 @@ sealed interface StakingIntegration {
val rewardClaiming: RewardClaiming
// Legal URLs
val legalUrls: StakingLegalUrls
// Basic
fun getCurrentToken(rawCurrencyId: CryptoCurrency.RawID?): YieldToken

View file

@ -0,0 +1,6 @@
package com.tangem.domain.staking.model
data class StakingLegalUrls(
val termsOfServiceUrl: String,
val privacyPolicyUrl: String,
)