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: expose HasMetadata on bank Keeper #10134

Merged
merged 3 commits into from
Sep 14, 2021
Merged

Conversation

fedekunze
Copy link
Collaborator

@fedekunze fedekunze commented Sep 13, 2021

Add HasMetaData to bank keeper API.


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 docs: prefix in the PR title
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the documentation writing guidelines
  • 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 docs: prefix in the PR title
  • confirmed all author checklist items have been addressed
  • confirmed that this PR only changes documentation
  • reviewed content for consistency
  • reviewed content for thoroughness
  • reviewed content for spelling and grammar
  • tested instructions (if applicable)

@orijbot
Copy link

orijbot commented Sep 13, 2021

@codecov
Copy link

codecov bot commented Sep 13, 2021

Codecov Report

Merging #10134 (06bd395) into master (6fc79b1) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 06bd395 differs from pull request most recent head 26e12bf. Consider uploading reports for the commit 26e12bf to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10134      +/-   ##
==========================================
- Coverage   63.62%   63.61%   -0.02%     
==========================================
  Files         573      572       -1     
  Lines       53606    53575      -31     
==========================================
- Hits        34109    34081      -28     
+ Misses      17550    17548       -2     
+ Partials     1947     1946       -1     
Impacted Files Coverage Δ
x/bank/keeper/keeper.go 72.75% <100.00%> (+0.38%) ⬆️
x/auth/tx/mode_handler.go 76.47% <0.00%> (-2.48%) ⬇️
client/tx/tx.go 40.00% <0.00%> (-1.58%) ⬇️
x/auth/tx/direct_aux.go

@fedekunze
Copy link
Collaborator Author

why is the linter suddenly failing?

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, but you don't really need this API. You can also do:

if _, ok := k.bankKeeper.GetDenomMetaData(ctx, baseDenom); !ok {
  // ...
}

@fedekunze
Copy link
Collaborator Author

fedekunze commented Sep 14, 2021

true @alexanderbez, although store.Has is cheaper than store.Get in terms of gas if you only want to check for the existence of a metadata

@fedekunze fedekunze added the A:automerge Automatically merge PR once all prerequisites pass. label Sep 14, 2021
@mergify mergify bot merged commit 8ebda84 into master Sep 14, 2021
@mergify mergify bot deleted the fedekunze/has-metadata branch September 14, 2021 16:12
@alexanderbez
Copy link
Contributor

Fair point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/bank
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants