Serum: Don't attempt deactivating token positions after serum actions

While a serum open orders is active, the base and quote token positions
for it are locked to active. It's pointless to check if they need to be
deactivated after place/settle etc.
This commit is contained in:
Christian Kamm 2022-08-25 18:33:03 +02:00
parent 1a95a84ed4
commit d63c5bfc76
3 changed files with 0 additions and 3 deletions

View File

@ -154,7 +154,6 @@ pub fn serum3_liq_force_cancel_orders(
&ctx.accounts.account.key(),
LoanOriginationFeeInstruction::Serum3LiqForceCancelOrders,
);
difference_result.deactivate_inactive_token_accounts(&mut account.borrow_mut());
Ok(())
}

View File

@ -336,7 +336,6 @@ pub fn serum3_place_order(
&ctx.accounts.account.key(),
LoanOriginationFeeInstruction::Serum3PlaceOrder,
);
vault_difference.deactivate_inactive_token_accounts(&mut account.borrow_mut());
Ok(())
}

View File

@ -169,7 +169,6 @@ pub fn serum3_settle_funds(ctx: Context<Serum3SettleFunds>) -> Result<()> {
&ctx.accounts.account.key(),
LoanOriginationFeeInstruction::Serum3SettleFunds,
);
difference_result.deactivate_inactive_token_accounts(&mut account.borrow_mut());
}
Ok(())