Skip to content

Conversation

@foodaka
Copy link

@foodaka foodaka commented Oct 7, 2024

  • Adds repay and repaywithpermit wrapper functionality

@height
Copy link

height bot commented Oct 7, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

require(amountWrapped > 0, 'INSUFFICIENT_WRAPPED_TOKEN_RECEIVED');

SafeERC20.safeApprove(IERC20(TOKEN_OUT), address(POOL), amountWrapped);
POOL.repay(TOKEN_OUT, amountWrapped, 2, onBehalfOf);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
POOL.repay(TOKEN_OUT, amountWrapped, 2, onBehalfOf);
POOL.repay(TOKEN_OUT, amountWrapped, VARIABLE_INTEREST_RATE_MODE, onBehalfOf);

}

function _repayToken(
uint256 amount,
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to handle max repayment here

Copy link
Contributor

Choose a reason for hiding this comment

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

so retrieve the outstanding debt of the user, and repay all if amount is higher.

we must do the same thing for withdraw

}

function testFuzzBorrowToken(uint256 borrowAmount) public {
function testFuzzRepayToken(
Copy link
Contributor

Choose a reason for hiding this comment

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

you are replacing testFuzzBorrowToken test?

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.

3 participants