From 475429758e241b2c87959161730ebf51962c9867 Mon Sep 17 00:00:00 2001 From: MoonBoi9001 Date: Fri, 4 Oct 2024 11:59:25 +0100 Subject: [PATCH] fix: apply consistent mapping order _isAuthorized (OZ_N-05) --- packages/horizon/contracts/staking/HorizonStaking.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/horizon/contracts/staking/HorizonStaking.sol b/packages/horizon/contracts/staking/HorizonStaking.sol index ed793a8e8..307fb4104 100644 --- a/packages/horizon/contracts/staking/HorizonStaking.sol +++ b/packages/horizon/contracts/staking/HorizonStaking.sol @@ -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) ); _; @@ -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); } /* @@ -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; }