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: validation swap msg and offerCoinFee ceiling #436

Merged
merged 7 commits into from
Aug 26, 2021

Conversation

dongsam
Copy link
Contributor

@dongsam dongsam commented Aug 23, 2021

Description

closes: #435

  • When calculating OfferCoinFee, the decimal points are rounded up.
  • Add test code for MsgSwapWithinBatch validation and OfferCoinFee calculation
  • Fix reserveOfferCoinFee residual Issue due to decimal error
  • Corrected the missing part of the Spec doc and updated the above.
  • Update Spec docs and description, swagger

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

@codecov
Copy link

codecov bot commented Aug 23, 2021

Codecov Report

Merging #436 (f4022bd) into develop (33a5ca6) will increase coverage by 1.76%.
The diff coverage is 50.00%.

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

@@             Coverage Diff             @@
##           develop     #436      +/-   ##
===========================================
+ Coverage    83.36%   85.13%   +1.76%     
===========================================
  Files           20       20              
  Lines         2302     2596     +294     
===========================================
+ Hits          1919     2210     +291     
- Misses         218      223       +5     
+ Partials       165      163       -2     
Impacted Files Coverage Δ
x/liquidity/types/utils.go 83.33% <37.50%> (-8.98%) ⬇️
x/liquidity/types/swap.go 79.10% <60.00%> (+0.78%) ⬆️
x/liquidity/keeper/liquidity_pool.go 84.03% <100.00%> (+2.22%) ⬆️
x/liquidity/abci.go 100.00% <0.00%> (ø)
x/liquidity/genesis.go 100.00% <0.00%> (ø)
x/liquidity/handler.go 100.00% <0.00%> (ø)
x/liquidity/types/keys.go 100.00% <0.00%> (ø)
x/liquidity/types/msgs.go 100.00% <0.00%> (ø)
x/liquidity/types/codec.go 100.00% <0.00%> (ø)
x/liquidity/types/genesis.go 100.00% <0.00%> (ø)
... and 13 more

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 33a5ca6...124c9d2. Read the comment docs.

@dongsam dongsam requested review from hallazzang and jaybxyz August 23, 2021 22:02
Copy link
Contributor

@jaybxyz jaybxyz left a comment

Choose a reason for hiding this comment

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

LGTM

@dongsam dongsam requested review from hallazzang and jaybxyz August 25, 2021 00:03
@dongsam dongsam requested review from jaybxyz and hallazzang August 25, 2021 08:01
x/liquidity/types/swap.go Outdated Show resolved Hide resolved
x/liquidity/types/swap.go Outdated Show resolved Hide resolved
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.

Add MsgSwapWithinBatch Verification and Fix OfferCoinFee Calculation
3 participants