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

fix(x/ecocredit): charge single basket fee and migrate param #1184

Merged
merged 14 commits into from
Jun 15, 2022

Conversation

ryanchristo
Copy link
Member

@ryanchristo ryanchristo commented Jun 13, 2022

Description

Closes: #1165 / Closes: #1166 / Ref: #1183

This pull request updates the fee requirements for basket creation to accept only one fee in MsgCreate. We are not bumping the basket package for v4.0.0 so instead we require no more than one fee in basic message validation and we use the minimum fee when checking the balance, sending to the module, and burning.

This pull request also sets the basket fee in the upgrade handler (again) because the field name has been updated but the key was still BasketCreationFee. To prevent confusion, the key is now BasketFee and matches the field name and in order to do so, it looks like we have to reset the basket fee in the upgrade handler but maybe there is another way.

Notes from manual testing: https://hackmd.io/wqnic3hIQtqndGyXi62zgQ


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)

@ryanchristo ryanchristo changed the title fix(x/ecocredit): consistent handling of basket fee fix(x/ecocredit): consistent handling of basket fee and migrate param Jun 13, 2022
@ryanchristo ryanchristo changed the title fix(x/ecocredit): consistent handling of basket fee and migrate param fix(x/ecocredit): charge single basket fee and migrate param Jun 13, 2022
@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #1184 (c602947) into master (eb742da) will increase coverage by 0.02%.
The diff coverage is 77.41%.

❗ Current head c602947 differs from pull request most recent head 6389a04. Consider uploading reports for the commit 6389a04 to get more accurate results

@@            Coverage Diff             @@
##           master    #1184      +/-   ##
==========================================
+ Coverage   69.59%   69.61%   +0.02%     
==========================================
  Files         221      221              
  Lines       23082    23087       +5     
==========================================
+ Hits        16064    16073       +9     
+ Misses       5638     5625      -13     
- Partials     1380     1389       +9     
Flag Coverage Δ
experimental-codecov 69.66% <82.75%> (+<0.01%) ⬆️
stable-codecov 64.09% <77.41%> (+0.02%) ⬆️

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

@ryanchristo ryanchristo marked this pull request as ready for review June 14, 2022 01:33
proto/regen/ecocredit/basket/v1/tx.proto Outdated Show resolved Hide resolved
x/ecocredit/server/basket/msg_create.go Outdated Show resolved Hide resolved
x/ecocredit/server/basket/msg_create.go Outdated Show resolved Hide resolved
@ryanchristo ryanchristo merged commit 8ef300a into master Jun 15, 2022
@ryanchristo ryanchristo deleted the ryan/1166-basket-fee-param branch June 15, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants