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: (x/bank) add SpendableCoin method to BaseViewKeeper #12593

Merged
merged 8 commits into from
Jul 20, 2022

Conversation

hallazzang
Copy link
Contributor

@hallazzang hallazzang commented Jul 15, 2022

Description

Closes: #12570

  • Implement SpendableCoin method
  • Write unit tests
  • Add gRPC query (Not needed)
  • Update relevant docs

This PR adds SpendableCoin method to the bank module's BaseViewKeeper.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@alexanderbez
Copy link
Contributor

@hallazzang I'm not really sure we need a gRPC query for this. We already have one for spendable coins. Maybe we can just add a query param to that one to filter by a single denom. No need for a whole new query.

@hallazzang
Copy link
Contributor Author

@alexanderbez Oh, I see. I agree with you. I'll finish the other tasks then.

@hallazzang hallazzang marked this pull request as ready for review July 19, 2022 04:57
@hallazzang hallazzang requested a review from a team as a code owner July 19, 2022 04:57
@julienrbrt
Copy link
Member

Can we add a changelog? :)

@hallazzang
Copy link
Contributor Author

@julienrbrt Sure. I've updated the CHANGELOG file and also merged main into this branch.

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

lgtm!

@codecov
Copy link

codecov bot commented Jul 20, 2022

Codecov Report

Merging #12593 (78867bb) into main (818da70) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #12593   +/-   ##
=======================================
  Coverage   65.19%   65.19%           
=======================================
  Files         693      693           
  Lines       71802    71806    +4     
=======================================
+ Hits        46809    46812    +3     
- Misses      22359    22360    +1     
  Partials     2634     2634           
Impacted Files Coverage Δ
x/bank/keeper/view.go 83.87% <100.00%> (+0.53%) ⬆️
crypto/keys/internal/ecdsa/privkey.go 81.13% <0.00%> (-1.89%) ⬇️

@alexanderbez alexanderbez merged commit 3523c26 into cosmos:main Jul 20, 2022
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.

x/bank: Add SpendableCoin keeper method
3 participants