Updated on 2026-08-14
This commit is contained in:
parent
e0e8fbcb22
commit
480b488bf8
4 changed files with 3 additions and 7 deletions
|
|
@ -1,6 +1,5 @@
|
|||
package com.tangem.domain.staking.model
|
||||
|
||||
import com.tangem.domain.staking.model.stakekit.BalanceItem
|
||||
import com.tangem.domain.staking.model.stakekit.BalanceType
|
||||
import com.tangem.domain.staking.model.stakekit.Yield
|
||||
import java.math.BigDecimal
|
||||
|
|
@ -12,5 +11,4 @@ data class PendingTransaction(
|
|||
val rawCurrencyId: String?,
|
||||
val validator: Yield.Validator?,
|
||||
val balancesId: Int,
|
||||
val balanceItems: List<BalanceItem>, // TODO staking remove it
|
||||
)
|
||||
|
|
@ -36,7 +36,9 @@ internal class YieldBalancesConverter(
|
|||
val fiatRate = cryptoCurrencyStatus.value.fiatRate
|
||||
val fiatRewardsValue = if (fiatRate != null && cryptoRewardsValue != null) {
|
||||
fiatRate.times(cryptoRewardsValue)
|
||||
} else null
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
InnerYieldBalanceState.Data(
|
||||
rewardsCrypto = BigDecimalFormatter.formatCryptoAmount(
|
||||
|
|
|
|||
|
|
@ -294,8 +294,6 @@ internal class StakingTransactionSender @AssistedInject constructor(
|
|||
rawCurrencyId = cryptoCurrencyStatus.currency.id.rawCurrencyId,
|
||||
validator = (confirmationState.validatorState as? ValidatorState.Content)?.chosenValidator,
|
||||
balancesId = (cryptoCurrencyStatus.value.yieldBalance as? YieldBalance.Data)?.getBalancesUniqueId() ?: 0,
|
||||
balanceItems = (cryptoCurrencyStatus.value.yieldBalance as? YieldBalance.Data)?.balance?.items
|
||||
?: emptyList(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ internal class SetPossiblePendingTransactionTransformer(
|
|||
rawCurrencyId = balanceState.rawCurrencyId,
|
||||
validator = balanceState.validator,
|
||||
balancesId = balancesId,
|
||||
balanceItems = (cryptoCurrencyStatus.value.yieldBalance as? YieldBalance.Data)?.balance?.items
|
||||
?: emptyList(),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue