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: terminate plan when deleting public plan proposal #162

Merged
merged 7 commits into from
Oct 13, 2021

Conversation

jaybxyz
Copy link
Contributor

@jaybxyz jaybxyz commented Oct 12, 2021

Description

closes: #161

Tasks

  • Add TerminationPlan logic in DeletePublicPlanProposal
    • Handle an edge case where FarmingPoolAddress and TerminationAddress are equal
  • Add test code to cover the case
  • Update related docs

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Appropriate labels applied
  • Targeted PR against correct branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@jaybxyz jaybxyz self-assigned this Oct 12, 2021
@jaybxyz jaybxyz marked this pull request as ready for review October 12, 2021 03:43
@jaybxyz jaybxyz requested review from hallazzang and dongsam October 12, 2021 03:44
x/farming/keeper/proposal_handler.go Outdated Show resolved Hide resolved
@jaybxyz jaybxyz requested a review from dongsam October 13, 2021 05:57
@dongsam dongsam merged commit bd64f31 into tendermint:master Oct 13, 2021
dongsam added a commit to dongsam/farming that referenced this pull request Oct 21, 2021
* commit '305f2fb7da43f1050dd6aa591b43bbdadefa63bd': (23 commits)
  chore: bump Cosmos SDK version to 0.44.2
  fix: emit `rewards_withdrawn` event (tendermint#166)
  chore: fix linter issue
  feat: refactor validating EpochAmount, EpochRatio
  feat: refactory ValidateStakingCoinTotalWeights
  fix: apply suggestions from review
  fix: terminate plan when deleting public plan proposal (tendermint#162)
  fix: change the logic to determine what the request is for
  chore: fix typo and use nil EpochRatio instead of zero
  chore: change error message
  test: update proposal handler tests
  fix: allow optional fields in UpdateRequestProposal
  fix: more strict validation and allow optional addrs
  fix: EpochAmount/EpochRatio fields can be both empty
  fix: allow empty plan name in UpdateRequestProposal
  fix!: forbid empty plan name and allow empty weights
  test: change expected error messages
  test: add tests for proposal validation
  test: add TestValidateStakingCoinTotalWeights
  fix: fix proposal validation logic
  ...
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.

fix: plan should terminate when deleting public plan proposal
3 participants