From 83419aabc8fcec70fb2fe7d5e5ea0327afc3139b Mon Sep 17 00:00:00 2001 From: Schlagonia Date: Mon, 5 Feb 2024 17:01:14 -0700 Subject: [PATCH] fix: role allowed --- contracts/debtAllocators/YieldManager/YieldManager.sol | 6 +++--- tests/manager/test_role_manager.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/debtAllocators/YieldManager/YieldManager.sol b/contracts/debtAllocators/YieldManager/YieldManager.sol index 332fdc7..2671918 100644 --- a/contracts/debtAllocators/YieldManager/YieldManager.sol +++ b/contracts/debtAllocators/YieldManager/YieldManager.sol @@ -219,7 +219,7 @@ contract YieldManager is Governance { */ function validateAllocation( address _vault, - Allocation[] memory _newAllocations + Allocation[] calldata _newAllocations ) external view virtual returns (bool) { // Get the total assets the vault has. uint256 _totalAssets = IVault(_vault).totalAssets(); @@ -253,7 +253,7 @@ contract YieldManager is Governance { */ function getCurrentAndExpectedRate( address _vault, - Allocation[] memory _newAllocations + Allocation[] calldata _newAllocations ) external view @@ -319,7 +319,7 @@ contract YieldManager is Governance { */ function updateAllocationPermissioned( address _vault, - Allocation[] memory _newAllocations + Allocation[] calldata _newAllocations ) external virtual onlyGovernance { address allocator = vaultAllocator[_vault]; require(allocator != address(0), "vault not added"); diff --git a/tests/manager/test_role_manager.py b/tests/manager/test_role_manager.py index ecc44ef..785b3cd 100644 --- a/tests/manager/test_role_manager.py +++ b/tests/manager/test_role_manager.py @@ -1511,7 +1511,7 @@ def test_remove_role( [strategy], daddy, ROLES.ADD_STRATEGY_MANAGER, sender=daddy ) - with ape.reverts("!allowed"): + with ape.reverts("!governance"): role_manager.removeRoles( [vault], daddy, ROLES.ADD_STRATEGY_MANAGER, sender=user )