/// Add repay amount to available liquidity and subtract settle amount from total borrows
Add repay amount to available liquidity and subtract settle amount from total borrows
Add repay amount to available liquidity and subtract settle amount from total borrows
pub fn repay(&mut self, repay_amount: u64, settle_amount: Decimal) -> ProgramResult {
        self.available_amount = self
            .available_amount
            .checked_add(repay_amount)
            .ok_or(LendingError::MathOverflow)?;
        self.borrowed_amount_wads = self.borrowed_amount_wads.try_sub(settle_amount)?;
        Ok(())
    }
pub fn repay ( & mut self , repay_amount : u64 , settle_amount : Decimal ) -> ProgramResult { self . available_amount = self . available_amount . checked_add ( repay_amount ) . ok_or ( LendingError :: MathOverflow ) ? ; self . borrowed_amount_wads = self . borrowed_amount_wads . try_sub ( settle_amount ) ? ; Ok ( ( ) ) }
Add repay amount to available liquidity and subtract settle amount from total borrows
Add repay amount to available liquidity and subtract settle amount from total borrows
&mut self
<not_specific>
repay_amount
u64
<not_specific>
settle_amount
Decimal
<not_specific>