diff --git a/src/AavePM.sol b/src/AavePM.sol index 073a988..e956e88 100644 --- a/src/AavePM.sol +++ b/src/AavePM.sol @@ -294,6 +294,8 @@ contract AavePM is uint256 suppliedCollateral = _convertExistingBalanceToWstETHAndSupplyToAave( this, getContractAddress("aavePool"), getTokenAddress("wstETH") ); + + // If any collateral was supplied, update the total. if (suppliedCollateral > 0) s_suppliedCollateralTotal += suppliedCollateral; // During a rebalance, I want to know how much debt was repaid. @@ -307,6 +309,8 @@ contract AavePM is uint256 suppliedCollateral = _convertExistingBalanceToWstETHAndSupplyToAave( this, getContractAddress("aavePool"), getTokenAddress("wstETH") ); + + // If any collateral was supplied, update the total. if (suppliedCollateral > 0) s_suppliedCollateralTotal += suppliedCollateral; // Reinvest any excess debt or collateral.