Skip to content

Conversation

defispartan
Copy link

@defispartan defispartan commented Oct 10, 2022

Extension of #222 which is the version currently deployed to the Aave interface

Adds condition to allow for repay with collateral when aToken and debtToken have the same underlying asset:

Old

    uint256 amountSold =
      _buyOnParaSwap(
        buyAllBalanceOffset,
        paraswapData,
        collateralAsset,
        debtAsset,
        collateralAmount,
        debtRepayAmount
      );

New

   uint256 amountSold = debtRepayAmount;

    if (collateralAsset != debtAsset) {
      amountSold = _buyOnParaSwap(
        buyAllBalanceOffset,
        paraswapData,
        collateralAsset,
        debtAsset,
        collateralAmount,
        debtRepayAmount
      );
    }

Copy link
Contributor

@kartojal kartojal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you delete the Yarn file? this is a NPM project and I would prevent to have both package-lock and yarn lock in the same project to prevent different dependencies between contributors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants