Updated on 2026-08-14
This commit is contained in:
parent
6311ce2e3c
commit
6dc6e28205
4 changed files with 41 additions and 0 deletions
|
|
@ -83,6 +83,16 @@ internal class YieldBalancesConverter(
|
|||
val blockchainId = cryptoCurrencyStatus.currency.network.rawId
|
||||
val isCoin = cryptoCurrencyStatus.currency.id.isCoin
|
||||
|
||||
val p2pEthPoolBalance = stakingBalance as? StakingBalance.Data.P2PEthPool
|
||||
if (p2pEthPoolBalance != null) {
|
||||
val hasEarnedRewards = !p2pEthPoolBalance.totalRewards.isZero()
|
||||
return if (hasEarnedRewards) {
|
||||
RewardBlockType.EthereumEarnedRewards
|
||||
} else {
|
||||
RewardBlockType.RewardUnavailable.DefaultRewardUnavailable
|
||||
}
|
||||
}
|
||||
|
||||
val stakeKitBalance = stakingBalance as? StakingBalance.Data.StakeKit
|
||||
val rewards = stakeKitBalance?.balance?.items
|
||||
?.filter { it.type == BalanceType.REWARDS && !it.amount.isZero() }
|
||||
|
|
|
|||
|
|
@ -243,6 +243,12 @@ private fun StakingRewardBlock(
|
|||
append(reward.rewardsCrypto.orMaskWithStars(isBalanceHidden))
|
||||
} to TangemTheme.colors.text.primary1
|
||||
}
|
||||
RewardBlockType.EthereumEarnedRewards -> {
|
||||
resourceReference(
|
||||
id = R.string.staking_details_autocompound_rewards_earned,
|
||||
formatArgs = wrappedList(reward.rewardsCrypto.orMaskWithStars(isBalanceHidden)),
|
||||
) to TangemTheme.colors.text.primary1
|
||||
}
|
||||
RewardBlockType.RewardUnavailable.DefaultRewardUnavailable -> {
|
||||
resourceReference(R.string.staking_details_auto_claiming_rewards_daily_text) to
|
||||
TangemTheme.colors.text.tertiary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue