Skip to content

Commit d4667e5

Browse files
committed
updating logic for add collateral and close position
1 parent 2fbbb1f commit d4667e5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

x/perpetual/keeper/msg_server_add_collateral.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package keeper
22

33
import (
44
"context"
5-
"cosmossdk.io/math"
65
"errors"
76
sdk "github.com/cosmos/cosmos-sdk/types"
87
"github.com/elys-network/elys/v7/x/perpetual/types"
@@ -53,9 +52,6 @@ func (k msgServer) AddCollateral(goCtx context.Context, msg *types.MsgAddCollate
5352
}
5453
k.EmitForceClose(ctx, "add_collateral", mtp, repayAmt, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, msg.Creator, allInterestsPaid, tradingAssetPrice, totalPerpetualFeesCoins, closingPrice, initialCollateralCoin, initialCustody, initialLiabilities, usdcPrice, closingRatio)
5554
// hooks are being called inside MTPTriggerChecksAndUpdates
56-
}
57-
58-
if forceClosed && closingRatio.Equal(math.LegacyOneDec()) {
5955
return &types.MsgAddCollateralResponse{}, nil
6056
}
6157

0 commit comments

Comments
 (0)