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!: leverage.MaxBorrow return zero instead of failing when there is no more to borrow #1694

Merged
merged 21 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions proto/umee/leverage/v1/leverage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ message Token {
// borrow positions under both current and historic prices. The default value of
// zero for this field causes current price to be used in those calculations
// for the affected Token.
// The time span covered by the historic median will be:
// oracle.Params.median_stamp_period * oracle.Params.historic_stamp_period * historic_medians.
uint32 historic_medians = 19 [
(gogoproto.moretags) = "yaml:\"historic_medians\""
];
Expand Down
1 change: 1 addition & 0 deletions proto/umee/leverage/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ service Msg {
rpc Borrow(MsgBorrow) returns (MsgBorrowResponse);

// MaxBorrow allows a user to borrow the maximum amount of tokens their collateral will allow.
// Zero is returned if there is no more tokens to borrow.
toteki marked this conversation as resolved.
Show resolved Hide resolved
robert-zaremba marked this conversation as resolved.
Show resolved Hide resolved
rpc MaxBorrow(MsgMaxBorrow) returns (MsgMaxBorrowResponse);

// Repay allows a user to repay previously borrowed tokens and interest.
Expand Down
94 changes: 47 additions & 47 deletions x/incentive/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions x/incentive/incentive.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading