Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions backend/pkg/api/handlers/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ func (h *HandlerService) PublicGetValidatorDashboard(w http.ResponseWriter, r *h
}
data.IsAboveEbLimit = data.Balances.EffectiveLatest.GreaterThan(premiumPerks.EffectiveBalancePerDashboard)
data.ChartHistorySeconds = premiumPerks.ChartHistorySeconds
data.RewardsChartHistorySeconds = premiumPerks.RewardsChartHistorySeconds
data.Name = name

response := types.GetValidatorDashboardResponse{
Expand Down
21 changes: 11 additions & 10 deletions backend/pkg/api/types/validator_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ type ValidatorBalances struct {
}

type VDBOverviewData struct {
Name string `json:"name,omitempty" extensions:"x-order=1"`
Network uint64 `json:"network"`
Groups []VDBOverviewGroup `json:"groups"`
Validators ValidatorStateCounts `json:"validators"`
Efficiency PeriodicValues[float64] `json:"efficiency"`
Rewards PeriodicValues[ClElValue[decimal.Decimal]] `json:"rewards"`
Apr PeriodicValues[ClElValue[float64]] `json:"apr"`
ChartHistorySeconds ChartHistorySeconds `json:"chart_history_seconds"`
Balances ValidatorBalances `json:"balances"`
IsAboveEbLimit bool `json:"is_above_effective_balance_limit"` // refers to owner; relevant for shared dashboards
Name string `json:"name,omitempty" extensions:"x-order=1"`
Network uint64 `json:"network"`
Groups []VDBOverviewGroup `json:"groups"`
Validators ValidatorStateCounts `json:"validators"`
Efficiency PeriodicValues[float64] `json:"efficiency"`
Rewards PeriodicValues[ClElValue[decimal.Decimal]] `json:"rewards"`
Apr PeriodicValues[ClElValue[float64]] `json:"apr"`
ChartHistorySeconds ChartHistorySeconds `json:"chart_history_seconds"`
RewardsChartHistorySeconds ChartHistorySeconds `json:"rewards_chart_history_seconds"`
Balances ValidatorBalances `json:"balances"`
IsAboveEbLimit bool `json:"is_above_effective_balance_limit"` // refers to owner; relevant for shared dashboards
}

type GetValidatorDashboardResponse ApiDataResponse[VDBOverviewData]
Expand Down
1 change: 1 addition & 0 deletions frontend/types/api/validator_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface VDBOverviewData {
rewards: PeriodicValues<ClElValue<string /* decimal.Decimal */>>;
apr: PeriodicValues<ClElValue<number /* float64 */>>;
chart_history_seconds: ChartHistorySeconds;
rewards_chart_history_seconds: ChartHistorySeconds;
balances: ValidatorBalances;
is_above_effective_balance_limit: boolean; // refers to owner; relevant for shared dashboards
}
Expand Down
Loading