Function prepareSwapCollateralInLoanEnd

    • Returns a group transaction to end swap collateral in a loan escrow. Must be groped together with swap_collateral_begin call.

      Parameters

      • loanAppId: number

        loan application to swap collateral in

      • poolManagerAppId: number

        pool manager application

      • userAddr: string

        account address for the user

      • escrowAddr: string

        account address for the loan escrow

      • oracle: Oracle

        oracle application to retrieve asset prices from

      • lpAssets: LPToken[]

        list of lp assets in loan

      • baseAssetIds: number[]

        list of base asset ids in loan (non-lp assets)

      • params: SuggestedParams

        suggested params for the transactions with the fees overwritten

      Returns Transaction[]

      Transaction[] swap collateral end group transaction