Skip to content

Commit

Permalink
feat: specify balance in finalizeRebalance function
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtekgrinder committed Sep 20, 2024
1 parent 7b96168 commit c3da3ef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions contracts/helpers/MultiBlockRebalancer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ contract MultiBlockRebalancer is BaseRebalancer {
* @notice Finalize a rebalance
* @param collateral address of the collateral
*/
function finalizeRebalance(address collateral) external onlyTrusted {
uint256 balance = IERC20(collateral).balanceOf(address(this));

function finalizeRebalance(address collateral, uint256 balance) external onlyTrusted {
try transmuter.updateOracle(collateral) {} catch {}
_adjustAllowance(address(agToken), address(transmuter), balance);
uint256 amountOut = transmuter.swapExactInput(
Expand Down

0 comments on commit c3da3ef

Please sign in to comment.