Skip to content

Commit

Permalink
fix: alignment of parameter order in _isAuthorized with _operatorAuth…
Browse files Browse the repository at this point in the history
… (OZ N-05)
  • Loading branch information
MoonBoi9001 committed Sep 18, 2024
1 parent 4387c6c commit 531a9c7
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, verifier, msg.sender),
HorizonStakingNotAuthorized(msg.sender, serviceProvider, verifier)
);
_;
Expand Down Expand Up @@ -509,7 +509,7 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
address serviceProvider,
address verifier
) external view override returns (bool) {
return _isAuthorized(operator, serviceProvider, verifier);
return _isAuthorized(serviceProvider, verifier, operator);
}

/*
Expand Down Expand Up @@ -961,7 +961,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 _verifier, address _operator) private view returns (bool) {
if (_operator == _serviceProvider) {
return true;
}
Expand Down

0 comments on commit 531a9c7

Please sign in to comment.