Skip to content

Commit 6a720f8

Browse files
authored
Add asset support check in approveStrategy function (#2776)
1 parent 272475f commit 6a720f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contracts/contracts/vault/VaultAdmin.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ abstract contract VaultAdmin is VaultCore {
169169
*/
170170
function approveStrategy(address _addr) external onlyGovernor {
171171
require(!strategies[_addr].isSupported, "Strategy already approved");
172+
require(
173+
IStrategy(_addr).supportsAsset(asset),
174+
"Asset not supported by Strategy"
175+
);
172176
strategies[_addr] = Strategy({ isSupported: true, _deprecated: 0 });
173177
allStrategies.push(_addr);
174178
emit StrategyApproved(_addr);

0 commit comments

Comments
 (0)