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

REST: tx/ vs tx/broadcast #3692

Closed
4 tasks
alexanderbez opened this issue Feb 20, 2019 · 2 comments · Fixed by #3696
Closed
4 tasks

REST: tx/ vs tx/broadcast #3692

alexanderbez opened this issue Feb 20, 2019 · 2 comments · Fixed by #3696
Labels
T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@alexanderbez
Copy link
Contributor

Summary

Not sure if this is intended, but there seems to be overlap between the POST @ /tx endpoint and the POST @ tx/broadcast endpoint, where the former seems more flexible as it allows for sync/async/block. Assuming this is not intended, the latter should be removed.

Proposal

// x/auth/client/rest/query.go

        // this should be removed altogether 
	r.HandleFunc(
		"/tx/broadcast",
		BroadcastTxRequestHandlerFn(cdc, cliCtx),
	).Methods("POST")

        // this should be moved to client/tx.go
	r.HandleFunc(
		"/tx/encode",
		EncodeTxRequestHandlerFn(cdc, cliCtx),
	).Methods("POST")

/cc @jackzampolin @cosmos/cosmos-ui


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez alexanderbez added REST Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. labels Feb 20, 2019
@fedekunze fedekunze added the T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). label Feb 20, 2019
@jackzampolin
Copy link
Member

I'm comfortable removing the endpoint with less functionality.

@jackzampolin
Copy link
Member

Sorry abt the close! Hit the wrong button it looks like 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants