Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-24 20:11:17 +05:00
parent 744185dfa5
commit be2ba06031
4 changed files with 31 additions and 19 deletions

View file

@ -107,7 +107,9 @@ internal class DefaultStakingRepository(
}
}
}
stakingYieldsStore.store(yields)
val shouldRewriteCache = yieldsResponses.all { it is ApiResponse.Success }
stakingYieldsStore.store(yields, shouldRewriteCache)
}
}
@ -488,6 +490,13 @@ internal class DefaultStakingRepository(
}
private fun findPrefetchedYield(yields: List<Yield>, currencyId: CryptoCurrency.RawID, symbol: String): Yield? {
if (!stakingFeatureToggles.isCardanoStakingEnabled && symbol.equals(
Blockchain.Cardano.currency,
ignoreCase = true,
)
) {
return null
}
return yields.find { yield ->
yield.tokens.any { it.coinGeckoId == currencyId.value && it.symbol == symbol }
}