Skip to content

Commit

Permalink
refactor(node-api): remove the extra logic because the length is 32 (#…
Browse files Browse the repository at this point in the history
…1455)

Co-authored-by: Devon Bear <itsdevbear@berachain.com>
Co-authored-by: ocnc2 <169075746+ocnc2@users.noreply.github.com>
Co-authored-by: Nidhi Singh <trippin@berachain.com>
  • Loading branch information
4 people authored Jul 18, 2024
1 parent 293d732 commit 43c5fcc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions mod/node-api/server/handlers/beacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ func (rh RouteHandlers) GetGenesis(c echo.Context) error {
if err != nil {
return err
}
if len(genesisRoot) == 0 {
return echo.NewHTTPError(
http.StatusNotFound,
"Chain genesis info is not yet known",
)
}
return c.JSON(http.StatusOK,
WrapData(types.GenesisData{
GenesisTime: "1590832934", // stub
Expand All @@ -62,9 +56,6 @@ func (rh RouteHandlers) GetStateRoot(c echo.Context) error {
if err != nil {
return err
}
if len(stateRoot) == 0 {
return echo.NewHTTPError(http.StatusNotFound, "State not found")
}
return c.JSON(http.StatusOK, types.ValidatorResponse{
ExecutionOptimistic: false, // stubbed
Finalized: false, // stubbed
Expand Down
2 changes: 1 addition & 1 deletion mod/node-api/server/types/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type EpochRequest struct {
}

type CommitteeIndexRequest struct {
ComitteeIndex string `query:"committee_index" validate:"committee_index"`
CommitteeIndex string `query:"committee_index" validate:"committee_index"`
}

type SlotRequest struct {
Expand Down

0 comments on commit 43c5fcc

Please sign in to comment.