Skip to content

Commit 47607a8

Browse files
committed
feat(api): indicate if above owners eb limits
1 parent ba18f9d commit 47607a8

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

backend/pkg/api/handlers/public.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ func (h *HandlerService) PublicGetValidatorDashboard(w http.ResponseWriter, r *h
259259
handleErr(w, r, err)
260260
return
261261
}
262+
data.IsAboveEbLimit = data.Balances.EffectiveLatest.GreaterThan(premiumPerks.EffectiveBalancePerDashboard)
262263
data.ChartHistorySeconds = premiumPerks.ChartHistorySeconds
263264
data.Name = name
264265

backend/pkg/api/types/validator_dashboard.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type VDBOverviewData struct {
3030
Apr PeriodicValues[ClElValue[float64]] `json:"apr"`
3131
ChartHistorySeconds ChartHistorySeconds `json:"chart_history_seconds"`
3232
Balances ValidatorBalances `json:"balances"`
33+
IsAboveEbLimit bool `json:"is_above_eb_limit"` // refers to owner; relevant for shared dashboards
3334
}
3435

3536
type GetValidatorDashboardResponse ApiDataResponse[VDBOverviewData]

frontend/types/api/validator_dashboard.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface VDBOverviewData {
2626
apr: PeriodicValues<ClElValue<number /* float64 */>>;
2727
chart_history_seconds: ChartHistorySeconds;
2828
balances: ValidatorBalances;
29+
is_above_eb_limit: boolean; // refers to owner; relevant for shared dashboards
2930
}
3031
export type GetValidatorDashboardResponse = ApiDataResponse<VDBOverviewData>;
3132
export interface VDBPostArchivingReturnData {

0 commit comments

Comments
 (0)