Skip to content

Commit

Permalink
refactor: add fields to validator dashboard group summary
Browse files Browse the repository at this point in the history
- adds efficiency, balances and rewards fields

See: BEDS-1065
  • Loading branch information
LuccaBitfly committed Jan 9, 2025
1 parent aef4d54 commit b817227
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/pkg/api/types/validator_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type VDBOverviewGroup struct {
Count uint64 `json:"count"`
}

type VDBOverviewBalances struct {
type ValidatorBalances struct {
Total decimal.Decimal `json:"total"`
Effective decimal.Decimal `json:"effective"`
StakedEth decimal.Decimal `json:"staked_eth"`
Expand All @@ -28,7 +28,7 @@ type VDBOverviewData struct {
Rewards PeriodicValues[ClElValue[decimal.Decimal]] `json:"rewards"`
Apr PeriodicValues[ClElValue[float64]] `json:"apr"`
ChartHistorySeconds ChartHistorySeconds `json:"chart_history_seconds"`
Balances VDBOverviewBalances `json:"balances"`
Balances ValidatorBalances `json:"balances"`
}

type GetValidatorDashboardResponse ApiDataResponse[VDBOverviewData]
Expand Down Expand Up @@ -82,6 +82,10 @@ type VDBGroupSummaryMissedRewards struct {
Sync decimal.Decimal `json:"sync" faker:"eth"`
}
type VDBGroupSummaryData struct {
Efficiency float64 `json:"efficiency"`
Balances ValidatorBalances `json:"balances"`
Rewards ClElValue[decimal.Decimal] `json:"rewards"`

AttestationsHead StatusCount `json:"attestations_head"`
AttestationsSource StatusCount `json:"attestations_source"`
AttestationsTarget StatusCount `json:"attestations_target"`
Expand Down

0 comments on commit b817227

Please sign in to comment.