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: Interpret x/0 collateral liquidity as 100% #1357

Merged
merged 8 commits into from
Sep 8, 2022
Merged

fix: Interpret x/0 collateral liquidity as 100% #1357

merged 8 commits into from
Sep 8, 2022

Conversation

toteki
Copy link
Member

@toteki toteki commented Sep 8, 2022

Description

Quick bugfix to solve an issue we found in QA

Collateral liquidity was being interpteted as zero before any collateral was added (even with nonzero liquidity)


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
  • added appropriate labels to the PR
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • 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 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)

@toteki toteki marked this pull request as ready for review September 8, 2022 19:18
@toteki toteki requested review from a team as code owners September 8, 2022 19:18
@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2022

Codecov Report

Merging #1357 (87fb8e2) into main (5cbf948) will increase coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1357      +/-   ##
==========================================
+ Coverage   52.22%   52.41%   +0.18%     
==========================================
  Files          69       69              
  Lines        6836     6863      +27     
==========================================
+ Hits         3570     3597      +27     
  Misses       2988     2988              
  Partials      278      278              
Impacted Files Coverage Δ
x/leverage/client/tests/suite.go 95.65% <100.00%> (ø)
x/leverage/client/tests/tests.go 100.00% <100.00%> (ø)
x/leverage/keeper/collateral.go 69.85% <100.00%> (+0.68%) ⬆️

Copy link
Member

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

Pre-approving. let's add more details to the comment.

x/leverage/keeper/collateral.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants