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 c7aa953 commit 4754297
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/horizon/contracts/staking/HorizonStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
*/
modifier onlyAuthorized(address serviceProvider, address verifier) {
require(
_isAuthorized(msg.sender, serviceProvider, verifier),
_isAuthorized(serviceProvider, msg.sender, verifier),
HorizonStakingNotAuthorized(serviceProvider, msg.sender, verifier)
);
_;
Expand Down Expand Up @@ -517,7 +517,7 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
address operator,
address verifier
) external view override returns (bool) {
return _isAuthorized(operator, serviceProvider, verifier);
return _isAuthorized(serviceProvider, operator, verifier);
}

/*
Expand Down Expand Up @@ -969,7 +969,7 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
* @dev Note that this function handles the special case where the verifier is the subgraph data service,
* where the operator settings are stored in the legacy mapping.
*/
function _isAuthorized(address _operator, address _serviceProvider, address _verifier) private view returns (bool) {
function _isAuthorized(address _serviceProvider, address _operator, address _verifier) private view returns (bool) {
if (_operator == _serviceProvider) {
return true;
}
Expand Down

0 comments on commit 4754297

Please sign in to comment.