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(())
    }
/// Subtract repay amount from total borrows and add to available liquidity
Subtract repay amount from total borrows and add to available liquidity
Subtract repay amount from total borrows and add to available liquidity
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 ( ( ) ) }
Subtract repay amount from total borrows and add to available liquidity
Subtract repay amount from total borrows and add to available liquidity
&mut self
repay_amount
u64
settle_amount
Decimal