Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nope-finance committed Feb 22, 2022
1 parent b05d3d1 commit 9efd124
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions token-lending/program/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ fn process_liquidate_obligation(
let clock = &Clock::from_account_info(next_account_info(account_info_iter)?)?;
let token_program_id = next_account_info(account_info_iter)?;

let _withdraw_collateral_amount = _liquidate_obligation(
_liquidate_obligation(
program_id,
liquidity_amount,
source_liquidity_info,
Expand Down Expand Up @@ -1849,7 +1849,7 @@ fn process_liquidate_obligation_and_redeem_reserve_collateral(
clock,
token_program_id,
)?;
let mut withdraw_reserve = Reserve::unpack(&withdraw_reserve_info.data.borrow())?;
let withdraw_reserve = Reserve::unpack(&withdraw_reserve_info.data.borrow())?;
if &withdraw_reserve.config.fee_receiver != withdraw_reserve_liquidity_fee_receiver_info.key {
msg!("Withdraw reserve liquidity fee receiver does not match the reserve liquidity fee receiver provided");
return Err(LendingError::InvalidAccountInput.into());
Expand All @@ -1866,12 +1866,6 @@ fn process_liquidate_obligation_and_redeem_reserve_collateral(
token_program: token_program_id.clone(),
})?;

withdraw_reserve.last_update.mark_stale();
Reserve::pack(
withdraw_reserve,
&mut withdraw_reserve_info.data.borrow_mut(),
)?;

Ok(())
}

Expand Down

0 comments on commit 9efd124

Please sign in to comment.