Skip to content

Commit

Permalink
added error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikasr committed Nov 2, 2022
1 parent d50d3f1 commit 6b82f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/liquidation/keeper/liquidate_borrow.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func (k Keeper) UpdateLockedBorrows(ctx sdk.Context, lockedVault types.LockedVau
collateralizationRatio, err := k.lend.CalculateCollateralizationRatio(ctx, lockedVault.AmountIn, assetIn, lockedVault.UpdatedAmountOut, assetOut)
if err != nil {
ctx.Logger().Error("Error Calculating CR in Liquidation, liquidate_borrow.go for locked vault ID %d", lockedVault.LockedVaultId)
return nil
return err
}
assetInprice, _ := k.market.GetTwa(ctx, assetIn.Id)
assetOutprice, _ := k.market.GetTwa(ctx, assetOut.Id)
Expand Down

0 comments on commit 6b82f35

Please sign in to comment.