Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Aug 1, 2024
1 parent 9cc45b6 commit 9321702
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/taiko-client/preconfapi.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
L2_HTTP=https://rpc.helder.taiko.xyz \
TAIKO_L1=0xf92d16327ADB54e13D13A90e7Cd092962c9e7a8f \
CORS_ORIGINS="*" \
go run cmd/main.go preconfapi
4 changes: 2 additions & 2 deletions packages/taiko-client/preconfapi/server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ func (s *PreconfAPIServer) GetTransactionByHash(c echo.Context) error {

return nil
}); err != nil {
return c.JSON(http.StatusNotFound, tx)
return c.JSON(http.StatusNotFound, nil)
}

if tx == nil {
return c.JSON(http.StatusNotFound, tx)
return c.JSON(http.StatusNotFound, nil)
}

return c.JSON(http.StatusOK, tx)
Expand Down
2 changes: 2 additions & 0 deletions packages/taiko-client/preconfapi/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ func (s *PreconfAPIServer) configureMiddleware(corsOrigins []string) {
s.echo.Use(middleware.CORSWithConfig(middleware.CORSConfig{
AllowOrigins: corsOrigins,
AllowCredentials: true,
AllowMethods: []string{echo.GET, echo.HEAD, echo.PUT, echo.PATCH, echo.POST, echo.DELETE},
AllowHeaders: []string{echo.HeaderOrigin, echo.HeaderContentType, echo.HeaderAccept},
}))
}

Expand Down

0 comments on commit 9321702

Please sign in to comment.