Updated on 2026-08-14
This commit is contained in:
parent
19fdd19139
commit
078e215ad7
18 changed files with 318 additions and 160 deletions
|
|
@ -20,9 +20,14 @@ internal class TokenDetailsBalanceSelectStateConverter(
|
|||
|
||||
override fun convert(value: TokenBalanceSegmentedButtonConfig): TokenDetailsState {
|
||||
return with(currentStateProvider()) {
|
||||
if (stakingBlocksState !is StakingBlockUM.Staked) return this
|
||||
val cryptoCurrencyStatus = cryptoCurrencyStatusProvider() ?: return this
|
||||
|
||||
if (stakingBlocksState !is StakingBlockUM.Staked &&
|
||||
stakingBlocksState !is StakingBlockUM.TemporaryUnavailable
|
||||
) {
|
||||
return this
|
||||
}
|
||||
|
||||
val yieldBalance = cryptoCurrencyStatus.value.yieldBalance as? YieldBalance.Data
|
||||
val stakingCryptoAmount = yieldBalance?.getTotalWithRewardsStakingBalance()
|
||||
val stakingFiatAmount = stakingCryptoAmount?.let { cryptoCurrencyStatus.value.fiatRate?.multiply(it) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue