Skip to content

Commit

Permalink
rename++
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Jun 23, 2023
1 parent af1c8b4 commit 6404b62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/leverage/keeper/liquidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (k Keeper) getLiquidationAmounts(
requestedRepay sdk.Coin,
rewardDenom string,
directLiquidation bool,
fastLiquidate bool,
leveragedLiquidate bool,
) (tokenRepay sdk.Coin, collateralLiquidate sdk.Coin, tokenReward sdk.Coin, err error) {
repayDenom := requestedRepay.Denom
collateralDenom := types.ToUTokenDenom(rewardDenom)
Expand Down Expand Up @@ -94,7 +94,7 @@ func (k Keeper) getLiquidationAmounts(

// max repayment amount is limited by a number of factors
maxRepay := totalBorrowed.AmountOf(repayDenom) // borrower position
if !fastLiquidate {
if !leveragedLiquidate {
// for traditional liquidations, liquidator account balance limits repayment
availableRepay := k.bankKeeper.SpendableCoins(ctx, liquidatorAddr).AmountOf(repayDenom)
maxRepay = sdk.MinInt(maxRepay, availableRepay)
Expand Down

0 comments on commit 6404b62

Please sign in to comment.