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

style: cosmetic cleanups #1237

Merged
merged 11 commits into from
Aug 17, 2022
Merged

style: cosmetic cleanups #1237

merged 11 commits into from
Aug 17, 2022

Conversation

robert-zaremba
Copy link
Member

Description

Follow up to #1222


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)

@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2022

Codecov Report

Merging #1237 (4d18bc4) into main (8d972ea) will increase coverage by 1.67%.
The diff coverage is 35.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1237      +/-   ##
==========================================
+ Coverage   50.53%   52.20%   +1.67%     
==========================================
  Files          67       67              
  Lines        6831     6827       -4     
==========================================
+ Hits         3452     3564     +112     
+ Misses       3135     3000     -135     
- Partials      244      263      +19     
Impacted Files Coverage Δ
x/leverage/keeper/msg_server.go 0.81% <0.00%> (-0.03%) ⬇️
x/leverage/types/tx.go 0.00% <0.00%> (ø)
x/leverage/keeper/keeper.go 54.16% <54.00%> (+13.31%) ⬆️
x/leverage/keeper/collateral.go 61.97% <60.00%> (+7.42%) ⬆️
x/leverage/simulation/operations.go 94.94% <100.00%> (ø)
x/leverage/keeper/reserves.go 75.00% <0.00%> (+6.81%) ⬆️
x/leverage/keeper/validate.go 50.00% <0.00%> (+7.40%) ⬆️
x/leverage/keeper/filter.go 100.00% <0.00%> (+31.57%) ⬆️
... and 1 more

x/leverage/keeper/keeper.go Outdated Show resolved Hide resolved
Copy link
Member

@toteki toteki left a comment

Choose a reason for hiding this comment

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

The style changes could be considered but this PR contains erroneous behavior changes.

I need to add better MsgLiquidate tests in keeper_test.go to catch this kind of thing - specifically devations from what the function says it did (in return values) and actual changes to borrowed, collateral, and account+balances.

@robert-zaremba
Copy link
Member Author

+1 for tests, thanks for review

@robert-zaremba
Copy link
Member Author

Up, calling for review and unblock.

x/leverage/keeper/collateral.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@adamewozniak adamewozniak left a comment

Choose a reason for hiding this comment

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

lgtm!

@robert-zaremba robert-zaremba merged commit f9b8a72 into main Aug 17, 2022
@robert-zaremba robert-zaremba deleted the robert/leverage-cosmetics branch August 17, 2022 11:12
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.

4 participants