From 6b82f35de7035b348913390d2f01c727cec622bd Mon Sep 17 00:00:00 2001 From: Pratik Date: Wed, 2 Nov 2022 19:42:05 +0530 Subject: [PATCH] added error handling --- x/liquidation/keeper/liquidate_borrow.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/liquidation/keeper/liquidate_borrow.go b/x/liquidation/keeper/liquidate_borrow.go index 477c57c5d..2efee6c8c 100644 --- a/x/liquidation/keeper/liquidate_borrow.go +++ b/x/liquidation/keeper/liquidate_borrow.go @@ -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)