Updated on 2026-08-14
This commit is contained in:
parent
3eb843a05f
commit
9c6d5fc4fa
15 changed files with 192 additions and 73 deletions
|
|
@ -63,9 +63,15 @@ data class BalanceItem(
|
|||
val validatorAddress: String?,
|
||||
val date: DateTime?,
|
||||
val pendingActions: List<PendingAction>,
|
||||
val pendingActionsConstraints: List<PendingActionConstraints>,
|
||||
val isPending: Boolean,
|
||||
)
|
||||
|
||||
data class PendingActionConstraints(
|
||||
val type: StakingActionType,
|
||||
val amountArg: PendingAction.PendingActionArgs.Amount?,
|
||||
)
|
||||
|
||||
data class PendingAction(
|
||||
val type: StakingActionType,
|
||||
val passthrough: String,
|
||||
|
|
@ -135,5 +141,21 @@ enum class BalanceType(val order: Int) {
|
|||
enum class RewardBlockType {
|
||||
NoRewards,
|
||||
Rewards,
|
||||
RewardsRequirementsError,
|
||||
RewardUnavailable,
|
||||
;
|
||||
|
||||
/**
|
||||
* Indicated whether action can be performed on available reward
|
||||
* For example, pending action CLAIM_REWARDS could be called
|
||||
*/
|
||||
val isActionable: Boolean
|
||||
get() = when (this) {
|
||||
NoRewards,
|
||||
RewardUnavailable,
|
||||
-> false
|
||||
RewardsRequirementsError,
|
||||
Rewards,
|
||||
-> true
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue