Function prepareRepayLoanWithCollateral

    • Returns a group transaction to repay borrow in a loan escrow using collateral.

      Parameters

      • loanAppId: number

        loan application to repay borrow in

      • poolManagerAppId: number

        pool manager application

      • userAddr: string

        account address for the user

      • escrowAddr: string

        account address for the loan escrow

      • receiverAddr: string

        account address to receive the rewards if any (typically the user's deposit escrow)

      • reserveAddr: string

        account address to receive the protocol revenue from the percentage of the accrued interest

      • pool: Pool

        pool to repay borrow and use collateral of

      • repayAmount: number | bigint

        amount of borrow to repay expressed in terms of the asset

      • isStable: boolean

        whether the borrow that is being repaid is a stable or variable rate borrow

      • params: SuggestedParams

        suggested params for the transactions with the fees overwritten

      Returns Transaction

      Transaction[] repay borrow with collateral group transaction