File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -539,7 +539,7 @@ func (h *HandlerService) PublicDeleteValidatorDashboardGroupValidators(w http.Re
539539func (h * HandlerService ) PublicPostValidatorDashboardValidators (w http.ResponseWriter , r * http.Request ) {
540540 var v validationError
541541 dashboardId := v .checkPrimaryDashboardId (mux .Vars (r )["dashboard_id" ])
542- type request struct {
542+ type request struct { // this must align with PostValidatorDashboardValidatorsRequest
543543 GroupId uint64 `json:"group_id,omitempty" x-nullable:"true"`
544544 Validators []intOrString `json:"validators,omitempty"`
545545 DepositAddress string `json:"deposit_address,omitempty"`
Original file line number Diff line number Diff line change @@ -365,3 +365,12 @@ type VDBPostValidatorsData struct {
365365 Index uint64 `json:"index"`
366366 GroupId uint64 `json:"group_id"`
367367}
368+
369+ // helper for frontend
370+ type PostValidatorDashboardValidatorsRequest struct {
371+ GroupId uint64 `json:"group_id,omitempty" x-nullable:"true"`
372+ Validators []interface {} `json:"validators,omitempty" tstype:"(number | string)[]"`
373+ DepositAddress string `json:"deposit_address,omitempty"`
374+ WithdrawalCredential string `json:"withdrawal_credential,omitempty"`
375+ Graffiti string `json:"graffiti,omitempty"`
376+ }
Original file line number Diff line number Diff line change @@ -321,3 +321,13 @@ export interface VDBPostValidatorsData {
321321 index : number /* uint64 */ ;
322322 group_id : number /* uint64 */ ;
323323}
324+ /**
325+ * helper for frontend
326+ */
327+ export interface PostValidatorDashboardValidatorsRequest {
328+ group_id ?: number /* uint64 */ ;
329+ validators ?: ( number | string ) [ ] ;
330+ deposit_address ?: string ;
331+ withdrawal_credential ?: string ;
332+ graffiti ?: string ;
333+ }
You can’t perform that action at this time.
0 commit comments