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

Apply feedback of Liquidity module QA #215

Merged
merged 11 commits into from
Apr 14, 2021

Conversation

dongsam
Copy link
Contributor

@dongsam dongsam commented Apr 7, 2021

Description

Apply feedback in Notion Page, #170

  • remove unused make scripts
  • Refactoring TransactAndRefundSwapLiquidityPool
  • Modify to return errors instead of panic, add error types
  • Simplify Multiple if than else cases on swap.go
  • Add comment for new swap model, breakFlag, appendFlag, etc
  • Add test scripts(will proceed through separate PR)

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.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • 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 tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@dongsam dongsam self-assigned this Apr 7, 2021
@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #215 (e371af1) into develop (5c05566) will decrease coverage by 0.59%.
The diff coverage is 65.38%.

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

@@             Coverage Diff             @@
##           develop     #215      +/-   ##
===========================================
- Coverage    83.43%   82.84%   -0.60%     
===========================================
  Files           20       20              
  Lines         2349     2215     -134     
===========================================
- Hits          1960     1835     -125     
  Misses         209      209              
+ Partials       180      171       -9     
Impacted Files Coverage Δ
x/liquidity/types/utils.go 100.00% <ø> (ø)
x/liquidity/keeper/invariants.go 58.78% <42.85%> (ø)
x/liquidity/keeper/swap.go 85.71% <42.85%> (-0.12%) ⬇️
x/liquidity/types/swap.go 77.91% <60.56%> (-3.91%) ⬇️
x/liquidity/keeper/liquidity_pool.go 78.66% <80.00%> (+0.74%) ⬆️
x/liquidity/keeper/batch.go 86.36% <0.00%> (-4.55%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c05566...2854273. Read the comment docs.

Hyung-bharvest and others added 10 commits April 9, 2021 11:32
it makes proto stub generation more deterministic
also:
- add OrderDirection field to MatchResult
- remove fractionalCnt since it isn't much useful
- remove appendFlag, breakFlag and make code more readable
- rename MatchResult.BatchMsg to MatchResult.SwapMsgState
- remove redundant fields in MatchResult which can be accessed through
underlying SwapMsgState field
  - MatchResult.OrderMsgIndex
  - MatchResult.OrderPrice
- move duplicate code into single place
- early-check errornous conditions
@dongsam dongsam marked this pull request as ready for review April 14, 2021 04:53
@dongsam dongsam requested a review from defihyung April 14, 2021 04:53
@dongsam dongsam removed their assignment Apr 14, 2021
@dongsam dongsam merged commit 45cacb8 into tendermint:develop Apr 14, 2021
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.

None yet

3 participants