Skip to content

Commit

Permalink
fix: Add mode to FlashLoan event
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmtzinf committed Dec 22, 2021
1 parent 1c60c61 commit 956c809
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/interfaces/IPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ interface IPool {
* @param user The address of the user swapping his rate mode
* @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable
**/

event SwapBorrowRateMode(
address indexed reserve,
address indexed user,
Expand Down Expand Up @@ -150,6 +150,7 @@ interface IPool {
* @param initiator The address initiating the flash loan
* @param asset The address of the asset being flash borrowed
* @param amount The amount flash borrowed
* @param interestRateMode The flashloan mode: 0 for regular flashloan, 1 for Stable debt, 2 for Variable debt
* @param premium The fee flash borrowed
* @param referralCode The referral code used
**/
Expand All @@ -158,6 +159,7 @@ interface IPool {
address indexed initiator,
address indexed asset,
uint256 amount,
DataTypes.InterestRateMode interestRateMode,
uint256 premium,
uint16 referralCode
);
Expand Down
3 changes: 3 additions & 0 deletions contracts/protocol/libraries/logic/FlashLoanLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ library FlashLoanLogic {
address indexed initiator,
address indexed asset,
uint256 amount,
DataTypes.InterestRateMode interestRateMode,
uint256 premium,
uint16 referralCode
);
Expand Down Expand Up @@ -195,6 +196,7 @@ library FlashLoanLogic {
msg.sender,
vars.currentAsset,
vars.currentAmount,
DataTypes.InterestRateMode(params.interestRateModes[vars.i]),
vars.totalPremiums[vars.i],
params.referralCode
);
Expand Down Expand Up @@ -279,6 +281,7 @@ library FlashLoanLogic {
msg.sender,
params.asset,
params.amount,
DataTypes.InterestRateMode(0),
vars.totalPremium,
0
);
Expand Down

0 comments on commit 956c809

Please sign in to comment.