Updated on 2026-08-14
This commit is contained in:
parent
2898ff1fa2
commit
423afc9584
2 changed files with 9 additions and 1 deletions
|
|
@ -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 -> {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue