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

feat: add QueryMaxWithdraw and MsgWithdrawMax #1642

Merged
merged 15 commits into from
Dec 5, 2022
Merged

feat: add QueryMaxWithdraw and MsgWithdrawMax #1642

merged 15 commits into from
Dec 5, 2022

Conversation

toteki
Copy link
Member

@toteki toteki commented Dec 2, 2022

This will make withdrawing 100% from frontend easier and less vulnerable to price and uToken exchange rate drift.


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 Dec 2, 2022

Codecov Report

Merging #1642 (01c45c7) into main (7e9ab7a) will increase coverage by 0.12%.
The diff coverage is 54.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1642      +/-   ##
==========================================
+ Coverage   54.05%   54.17%   +0.12%     
==========================================
  Files          71       71              
  Lines        7150     7483     +333     
==========================================
+ Hits         3865     4054     +189     
- Misses       2988     3115     +127     
- Partials      297      314      +17     
Impacted Files Coverage Δ
x/leverage/keeper/msg_server.go 10.85% <0.00%> (-1.07%) ⬇️
x/leverage/types/query.pb.gw.go 0.00% <0.00%> (ø)
x/leverage/types/tx.go 0.00% <0.00%> (ø)
x/leverage/keeper/grpc_query.go 62.38% <42.30%> (-0.30%) ⬇️
x/leverage/keeper/keeper.go 66.41% <50.00%> (ø)
x/leverage/keeper/limits.go 41.11% <54.23%> (+25.48%) ⬆️
x/leverage/keeper/oracle.go 64.13% <71.42%> (+1.05%) ⬆️
x/leverage/keeper/liquidate.go 83.62% <84.61%> (+0.59%) ⬆️
x/leverage/client/tests/tests.go 100.00% <100.00%> (ø)
... and 3 more

@toteki toteki marked this pull request as ready for review December 2, 2022 21:38
@toteki toteki requested review from a team as code owners December 2, 2022 21:38
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.

Only reviewed the proto

proto/umee/leverage/v1/tx.proto Outdated Show resolved Hide resolved
proto/umee/leverage/v1/query.proto Show resolved Hide resolved
x/leverage/client/cli/tx.go Outdated Show resolved Hide resolved
Copy link
Member Author

@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.

Added some comments to guide reviewers. Let's get this merged quickly

proto/umee/leverage/v1/query.proto Show resolved Hide resolved
proto/umee/leverage/v1/tx.proto Outdated Show resolved Hide resolved
x/leverage/keeper/msg_server.go Show resolved Hide resolved
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.

utACK

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
@toteki toteki merged commit 06bbdd4 into main Dec 5, 2022
@toteki toteki deleted the adam/max branch December 5, 2022 20:01
@toteki toteki mentioned this pull request Jan 5, 2023
17 tasks
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.

3 participants