Skip to content

Commit

Permalink
fix: apply consistent mapping order isAuthorized (OZ_N-05)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonBoi9001 committed Oct 4, 2024
1 parent 4754297 commit 8a5b876
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ abstract contract ProvisionManager is Initializable, GraphDirectory, ProvisionMa
*/
modifier onlyProvisionAuthorized(address serviceProvider) {
require(
_graphStaking().isAuthorized(msg.sender, serviceProvider, address(this)),
_graphStaking().isAuthorized(serviceProvider, msg.sender, address(this)),
ProvisionManagerNotAuthorized(serviceProvider, msg.sender)
);
_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ abstract contract HorizonStakingSharedTest is GraphBaseTest {

// before
bool beforeOperatorAllowed = _getStorage_OperatorAuth(msgSender, operator, verifier, legacy);
bool beforeOperatorAllowedGetter = staking.isAuthorized(operator, msgSender, verifier);
bool beforeOperatorAllowedGetter = staking.isAuthorized(msgSender, operator, verifier);
assertEq(beforeOperatorAllowed, beforeOperatorAllowedGetter);

// setOperator
Expand All @@ -769,7 +769,7 @@ abstract contract HorizonStakingSharedTest is GraphBaseTest {

// after
bool afterOperatorAllowed = _getStorage_OperatorAuth(msgSender, operator, verifier, legacy);
bool afterOperatorAllowedGetter = staking.isAuthorized(operator, msgSender, verifier);
bool afterOperatorAllowedGetter = staking.isAuthorized(msgSender, operator, verifier);
assertEq(afterOperatorAllowed, afterOperatorAllowedGetter);

// assert
Expand Down Expand Up @@ -1487,8 +1487,8 @@ abstract contract HorizonStakingSharedTest is GraphBaseTest {
);

bool isAuth = staking.isAuthorized(
msgSender,
beforeValues.allocation.indexer,
msgSender,
subgraphDataServiceLegacyAddress
);
address rewardsDestination = _getStorage_RewardsDestination(beforeValues.allocation.indexer);
Expand Down

0 comments on commit 8a5b876

Please sign in to comment.