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

Move /bank/balances/{address} REST endpoint into /x/bank #4570

Merged
merged 5 commits into from
Jun 18, 2019

Conversation

alessio
Copy link
Contributor

@alessio alessio commented Jun 17, 2019

Closes: #4560

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added a relevant changelog entry: clog add [section] [stanza] [message]
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@alessio alessio changed the title Alessio/bank querier Move /bank/balances/{address} REST endpoint into /x/bank Jun 17, 2019
x/bank now provides a Querier too.

Closes: #4560
@alessio alessio marked this pull request as ready for review June 17, 2019 15:07
@alessio alessio requested review from fedekunze and sabau June 17, 2019 15:07
@codecov
Copy link

codecov bot commented Jun 17, 2019

Codecov Report

Merging #4570 into master will increase coverage by 0.03%.
The diff coverage is 61.9%.

@@            Coverage Diff             @@
##           master    #4570      +/-   ##
==========================================
+ Coverage   52.65%   52.68%   +0.03%     
==========================================
  Files         261      263       +2     
  Lines       16410    16427      +17     
==========================================
+ Hits         8640     8655      +15     
- Misses       7124     7125       +1     
- Partials      646      647       +1

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

LGTM! Just a minor nitpick 👍

x/bank/internal/types/querier.go Outdated Show resolved Hide resolved
x/bank/internal/types/querier.go Outdated Show resolved Hide resolved
x/bank/internal/types/querier.go Outdated Show resolved Hide resolved
x/bank/internal/types/querier.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

why don't we remove this endpoint all together? I really don't see the need of keeping it as we already have that functionality

Co-Authored-By: Alexander Bezobchuk <[email protected]>
@alexanderbez
Copy link
Contributor

Because clients depend on this endpoint @fedekunze :)

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK

@@ -17,6 +16,7 @@ import (
// RegisterRoutes - Central function to define routes that get registered by the main application
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router) {
r.HandleFunc("/bank/accounts/{address}/transfers", SendRequestHandlerFn(cliCtx)).Methods("POST")
r.HandleFunc("/bank/balances/{address}", QueryBalancesRequestHandlerFn(cliCtx)).Methods("GET")
Copy link
Contributor

Choose a reason for hiding this comment

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

that's a much better place

Copy link
Contributor

@sabau sabau left a comment

Choose a reason for hiding this comment

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

ACK

@alessio alessio merged commit 1e7c4dd into master Jun 18, 2019
@alessio alessio deleted the alessio/bank-querier branch June 18, 2019 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move or Rename /bank/balances/{address}
5 participants