From fc5fbfca7f59124ead9492f9827d99f3c5059f62 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 20 Jan 2026 15:47:35 +0200 Subject: [PATCH] Updated on 2026-08-14 --- .../impl/presentation/model/StakingModel.kt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/model/StakingModel.kt b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/model/StakingModel.kt index f4d1fdfd3e..a70dfc89f5 100644 --- a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/model/StakingModel.kt +++ b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/model/StakingModel.kt @@ -203,17 +203,19 @@ internal class StakingModel @Inject constructor( private val balancesToShow: List get() { val stakingBalance = cryptoCurrencyStatus.value.stakingBalance - return when (stakingBalance) { - is StakingBalance.Data.StakeKit -> { - val invalidatedItems = invalidatePendingTransactionsUseCase( - balanceItems = stakingBalance.balance.items, + return when (integration) { + is StakeKitIntegration -> { + val balanceItems = (stakingBalance as? StakingBalance.Data.StakeKit) + ?.balance?.items.orEmpty() + invalidatePendingTransactionsUseCase( + balanceItems = balanceItems, stakingActions = stakingActions, token = integration.token, - ).getOrElse { emptyList() } - invalidatedItems.toStakingBalanceEntries() + ).getOrElse { emptyList() }.toStakingBalanceEntries() + } + is P2PEthPoolIntegration -> { + (stakingBalance as? StakingBalance.Data.P2PEthPool)?.entries.orEmpty() } - is StakingBalance.Data.P2PEthPool -> stakingBalance.entries - else -> emptyList() } }