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

refactor(x/ecocredit): clean up ecocredit transaction commads #1199

Merged
merged 9 commits into from
Jun 28, 2022

Conversation

ryanchristo
Copy link
Member

@ryanchristo ryanchristo commented Jun 20, 2022

Description

Ref: #715 / Ref: #1041

This pull request makes the following changes:

  • Consistent use of json file for transaction commands (previously some yaml and some json)
  • Removes empty argument checks (each transaction command already calls ValidateBasic)
  • Updates transaction command integration tests to reuse test values and only test command-specific cases

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)

@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #1199 (7fba245) into master (2800b3c) will decrease coverage by 4.26%.
The diff coverage is 99.14%.

@@            Coverage Diff             @@
##           master    #1199      +/-   ##
==========================================
- Coverage   70.32%   66.06%   -4.27%     
==========================================
  Files         235      236       +1     
  Lines       23976    22358    -1618     
==========================================
- Hits        16862    14770    -2092     
- Misses       5658     6245     +587     
+ Partials     1456     1343     -113     
Flag Coverage Δ
experimental-codecov ?
stable-codecov 66.06% <99.14%> (+0.99%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ryanchristo ryanchristo mentioned this pull request Jun 20, 2022
31 tasks
@ryanchristo ryanchristo marked this pull request as ready for review June 24, 2022 02:28
@ryanchristo
Copy link
Member Author

I can break this up if need be. There are still improvements that could be made to the transaction commands, specifically the descriptions and examples, but this pull request is already pretty large so a followup might make more sense.

Comment on lines +9 to +10
// CheckDuplicateKey checks duplicate keys in JSON
func CheckDuplicateKey(d *json.Decoder, path []string) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

This was moved outside ecocredit/client so that it could be reused in ecocredits/client/marketplace and ecocredit/client/basket without import issues. Also might be helpful in other parts of the code in the future.

Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

nice! good stuff 💪🏻

Copy link
Contributor

@aleem1314 aleem1314 left a comment

Choose a reason for hiding this comment

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

lgtm

@ryanchristo ryanchristo merged commit cec010f into master Jun 28, 2022
@ryanchristo ryanchristo deleted the ryan/ecocredit-client-tx branch June 28, 2022 16:01
@ryanchristo ryanchristo mentioned this pull request Jun 30, 2022
4 tasks
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.

3 participants