Skip to content

Commit

Permalink
Use forceApprove for approvals
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatmittal committed May 14, 2024
1 parent 8f1b291 commit a0942b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/helper/ERC4626Router.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract ERC4626Router {
// Figure out the deposit amount for the vault
// Note: This also accounts for any assets that were transferred to the contract
uint256 depositAmount = asset.balanceOf(address(this));
asset.approve(address(vault), depositAmount);
SafeERC20.forceApprove(asset, address(vault), depositAmount);

if (i != vaultCount - 1) {
// If it's not the last vault, we deposit while minting to the contract.
Expand Down

0 comments on commit a0942b7

Please sign in to comment.