Skip to content

Commit

Permalink
fix: Add useATokens param to Repay event
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Nov 16, 2021
1 parent c911d24 commit beec3f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion contracts/interfaces/IPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ interface IPool {
* @param user The beneficiary of the repayment, getting his debt reduced
* @param repayer The address of the user initiating the repay(), providing the funds
* @param amount The amount repaid
* @param useATokens True if the repayment is done using aTokens, `false` if done with underlying asset directly
**/
event Repay(
address indexed reserve,
address indexed user,
address indexed repayer,
uint256 amount
uint256 amount,
bool useATokens
);

/**
Expand Down
5 changes: 3 additions & 2 deletions contracts/protocol/libraries/logic/BorrowLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ library BorrowLogic {
address indexed reserve,
address indexed user,
address indexed repayer,
uint256 amount
uint256 amount,
bool useATokens
);

event RebalanceStableBorrowRate(address indexed reserve, address indexed user);
Expand Down Expand Up @@ -230,7 +231,7 @@ library BorrowLogic {
IAToken(reserveCache.aTokenAddress).handleRepayment(msg.sender, paybackAmount);
}

emit Repay(params.asset, params.onBehalfOf, msg.sender, paybackAmount);
emit Repay(params.asset, params.onBehalfOf, msg.sender, paybackAmount, params.useATokens);

return paybackAmount;
}
Expand Down

0 comments on commit beec3f8

Please sign in to comment.