File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
programs/drift/src/controller Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -341,10 +341,7 @@ pub fn liquidate_perp(
341341 slot,
342342 ) ?;
343343
344- let transfer_price = market. get_liquidation_transfer_price (
345- oracle_price,
346- user. perp_positions [ position_index] . get_direction ( ) ,
347- ) ?;
344+ let transfer_price = market. get_liquidation_transfer_price ( oracle_price) ?;
348345 let transfer_price_fee = calculate_transfer_price_as_fee ( transfer_price, oracle_price) ?;
349346
350347 let if_liquidation_fee = calculate_perp_if_fee (
@@ -959,10 +956,7 @@ pub fn liquidate_perp_with_fill(
959956 . price ;
960957 let liquidator_fee = market. liquidator_fee ;
961958
962- let transfer_price = market. get_liquidation_transfer_price (
963- oracle_price,
964- user. perp_positions [ position_index] . get_direction ( ) ,
965- ) ?;
959+ let transfer_price = market. get_liquidation_transfer_price ( oracle_price) ?;
966960 let transfer_price_fee = calculate_transfer_price_as_fee ( transfer_price, oracle_price) ?;
967961
968962 let if_liquidation_fee = calculate_perp_if_fee (
You can’t perform that action at this time.
0 commit comments