Skip to content

Commit

Permalink
Minor zero check, remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jgur-psyops committed Oct 22, 2024
1 parent 8eb4833 commit b670878
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ pub fn lending_account_borrow<'info>(
{
let mut bank = bank_loader.load_mut()?;
let bank_fees_before: I80F48 = bank.collected_group_fees_outstanding.into();
let bank_fees_after: I80F48 = bank_fees_before.saturating_add(origination_fee);
let bank_fees_after: I80F48 = if origination_fee.is_zero() {
bank_fees_before
} else {
bank_fees_before.saturating_add(origination_fee)
};
bank.collected_group_fees_outstanding = bank_fees_after.into();
}

Expand Down
3 changes: 0 additions & 3 deletions programs/marginfi/tests/admin_actions/bankruptcy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,6 @@ async fn marginfi_group_handle_bankruptcy_success_fully_insured(
user_mfi_account.lending_account.balances[0].asset_shares = I80F48::ZERO.into();
user_mfi_account_f.set_account(&user_mfi_account).await?;

// let liab: I80F48 = user_mfi_account.lending_account.balances[1].liability_shares.into();
// println!("debt actual: {:?}",liab.to_num::<u64>());

{
let (insurance_vault, _) = test_f
.get_bank(&debt_mint)
Expand Down

0 comments on commit b670878

Please sign in to comment.