File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol"
66
77import {IEVC} from "evc/interfaces/IEthereumVaultConnector.sol " ;
88import {IEVault, IBorrowing, IERC4626 , IRiskManager} from "evk/EVault/IEVault.sol " ;
9- import {Errors as EVKErrors} from "evk/EVault/shared/Errors.sol " ;
109
1110import {IEulerSwap} from "../interfaces/IEulerSwap.sol " ;
1211
@@ -15,6 +14,9 @@ library FundsLib {
1514
1615 error DepositFailure (bytes reason );
1716
17+ error E_ZeroShares (); // EVK error
18+ error ZeroShares (); // Euler Earn error
19+
1820 /// @notice Approves tokens for a given vault, supporting both standard approvals and permit2
1921 /// @param vault The address of the vault to approve the token for
2022 function approveVault (address vault ) internal {
@@ -97,7 +99,10 @@ library FundsLib {
9799 if (amount > 0 ) {
98100 try IEVault (supplyVault).deposit (amount, eulerAccount) {}
99101 catch (bytes memory reason ) {
100- require (bytes4 (reason) == EVKErrors.E_ZeroShares.selector , DepositFailure (reason));
102+ require (
103+ bytes4 (reason) == E_ZeroShares.selector || bytes4 (reason) == ZeroShares.selector ,
104+ DepositFailure (reason)
105+ );
101106 amount = 0 ;
102107 }
103108
You can’t perform that action at this time.
0 commit comments