Function pallet_loans::pallet::dispatchables::repay
source · pub fn repay<T: Config>(
pool_id: T::PoolId,
loan_id: T::LoanId,
amount: RepaidInput<T>
)
Expand description
Transfers amount borrowed to the pool reserve.
The origin must be the borrower of the loan.
The repay action should fulfill the repay restrictions
configured at types::RepayRestrictions
.
If the repaying amount
is more than current debt, only current
debt is transferred. This does not apply to unscheduled_amount
,
which can be used to repay more than the outstanding debt.
The portfolio valuation of the pool is updated to reflect the new
present value of the loan.
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::repay
.