Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2022-05-17 13:01:48 +02:00
parent a4f3569a87
commit f19f3da659
1 changed files with 2 additions and 0 deletions

View File

@ -76,6 +76,8 @@ pub fn perp_place_order(
// When the limit is reached, processing stops and the instruction succeeds.
limit: u8,
) -> Result<()> {
// TODO: check pre and post health
let mut mango_account = ctx.accounts.account.load_mut()?;
require!(mango_account.is_bankrupt == 0, MangoError::IsBankrupt);
let mango_account_pk = ctx.accounts.account.key();