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: fix total farming amount in LiquidFarm and LiquidUnfarm #95

Merged
merged 9 commits into from
Nov 8, 2022

Conversation

queencre
Copy link
Contributor

@queencre queencre commented Nov 4, 2022

Description

This PR fixes to use GetPosition instead of GetFarm function in both LiquidFarm and LiquidUnfarm msg server because Farm.TotalFarmingAmount leads to invalid calculation of LPCoinTotalAmount if there are some farmers who directly farm through the lpfarm module.

closes: #93

Tasks

  • Use GetPosition instead of GetFarm function in both LiquidFarm and LiquidUnfarm
  • Fix grpc queries (LiquidFarm, LiquidFarms, and ExchangeRate)
  • Update LiquidFarmResponse params
  • Add test cases to verify
  • 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

@queencre queencre self-assigned this Nov 4, 2022
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 4, 2022
@queencre queencre marked this pull request as ready for review November 4, 2022 23:38
Copy link
Contributor

@hallazzang hallazzang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kingcre kingcre left a comment

Choose a reason for hiding this comment

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

LGTM

@queencre
Copy link
Contributor Author

queencre commented Nov 8, 2022

Tasks

  • Specify Ignite CLI version to use
  • Rename RewardAuctions to RewardsAuctions for consistency
  • Filter bids by descending order to show the highest bid first in Bids gRPC query

@queencre queencre merged commit e2b7a57 into crescent-network:main Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation x/liquidfarming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix to use Position rather than Farm for LiquidFarm and LiquidUnfarm
4 participants