Function prepareRepayLoanWithTxn

    • Returns a group transaction to repay borrow in a loan escrow using assets sent from user.

      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 of

      • repayAmount: number | bigint

        amount of borrow to repay

      • 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[] reduce borrow with transaction group transaction