Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: re-add validator-vesting legacy rest endpoints #1542

Merged
merged 3 commits into from
Apr 6, 2023

Conversation

drklee3
Copy link
Member

@drklee3 drklee3 commented Apr 6, 2023

Description

Adds the legacy /vesting/* rest endpoints back, along with the required cosmos methods.

Checklist

  • Changelog has been updated as necessary.

@drklee3 drklee3 marked this pull request as ready for review April 6, 2023 21:39

// ReadRESTReq reads and unmarshals a Request's body to the the BaseReq struct.
// Writes an error response to ResponseWriter and returns false if errors occurred.
func ReadRESTReq(w http.ResponseWriter, r *http.Request, cdc *codec.LegacyAmino, req interface{}) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to the BaseReq struct
Idiomatic go is to return error vs bool to signal error and have callers check if nil -> https://go.dev/doc/effective_go#multiple-returns

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest files are just the removed files from cosmos temporarily copied while we support the endpoints, I'll just leave it as is for now since we may be removing it later again 😅

@drklee3 drklee3 merged commit 23e054e into master Apr 6, 2023
@drklee3 drklee3 deleted the dl-supply-endpoints branch April 6, 2023 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants