Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-29 19:07:17 +03:00
parent 2898ff1fa2
commit 423afc9584
2 changed files with 9 additions and 1 deletions

View file

@ -110,6 +110,10 @@ sealed interface StakingIntegrationID {
val integrationId = blockchain.integrationId ?: return null
if (integrationId is Coin && currencyId.contractAddress != null) {
return null
}
return when (integrationId) {
is Coin -> integrationId
is EthereumToken -> {

View file

@ -139,9 +139,13 @@ class StakingIntegrationIDTest {
expected = StakingIntegrationID.Coin.Cardano,
),
CreateModel(
currencyId = CryptoCurrency.ID.fromValue(value = "coin⟨ETH⟩polygon-ecosystem-token⚓"),
currencyId = CryptoCurrency.ID.fromValue(value = "token⟨ETH⟩polygon-ecosystem-token⚓1234567890"),
expected = StakingIntegrationID.EthereumToken.Polygon,
),
CreateModel(
currencyId = CryptoCurrency.ID.fromValue(value = "token⟨SOLANA⟩solana⚓1234567890"),
expected = null,
),
)
}