pub fn repay(&mut self, repay_amount: u64, settle_amount: Decimal) -> ProgramResult {
        self.available_amount = self
            .available_amount
            .checked_add(repay_amount)
            .ok_or(PoolingError::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
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(PoolingError::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 ( PoolingError :: 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
repay_amount
u64
settle_amount
Decimal
&mut self
repay_amount
u64
settle_amount
Decimal