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 23ba26b commit cb2da11
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 @@ -92,7 +92,7 @@ abstract contract ProvisionManager is Initializable, GraphDirectory, ProvisionMa
*/
modifier onlyAuthorizedForProvision(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 @@ -753,7 +753,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 @@ -767,7 +767,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 @@ -1390,8 +1390,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 cb2da11

Please sign in to comment.