diff --git a/packages/horizon/contracts/data-service/extensions/DataServicePausable.sol b/packages/horizon/contracts/data-service/extensions/DataServicePausable.sol index 3a42bc8f4..16cd26885 100644 --- a/packages/horizon/contracts/data-service/extensions/DataServicePausable.sol +++ b/packages/horizon/contracts/data-service/extensions/DataServicePausable.sol @@ -32,12 +32,12 @@ abstract contract DataServicePausable is Pausable, DataService, IDataServicePaus } /// @inheritdoc IDataServicePausable - function pause() external override onlyPauseGuardian whenNotPaused { + function pause() external override onlyPauseGuardian { _pause(); } /// @inheritdoc IDataServicePausable - function unpause() external override onlyPauseGuardian whenPaused { + function unpause() external override onlyPauseGuardian { _unpause(); } diff --git a/packages/horizon/contracts/data-service/extensions/DataServicePausableUpgradeable.sol b/packages/horizon/contracts/data-service/extensions/DataServicePausableUpgradeable.sol index 6946a0091..da4d8fd77 100644 --- a/packages/horizon/contracts/data-service/extensions/DataServicePausableUpgradeable.sol +++ b/packages/horizon/contracts/data-service/extensions/DataServicePausableUpgradeable.sol @@ -31,12 +31,12 @@ abstract contract DataServicePausableUpgradeable is PausableUpgradeable, DataSer } /// @inheritdoc IDataServicePausable - function pause() external override onlyPauseGuardian whenNotPaused { + function pause() external override onlyPauseGuardian { _pause(); } /// @inheritdoc IDataServicePausable - function unpause() external override onlyPauseGuardian whenPaused { + function unpause() external override onlyPauseGuardian { _unpause(); } diff --git a/packages/horizon/contracts/staking/HorizonStaking.sol b/packages/horizon/contracts/staking/HorizonStaking.sol index 1a396b318..49d753ffb 100644 --- a/packages/horizon/contracts/staking/HorizonStaking.sol +++ b/packages/horizon/contracts/staking/HorizonStaking.sol @@ -735,8 +735,9 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain { * @param _tokens The amount of tokens to add to the provision */ function _addToProvision(address _serviceProvider, address _verifier, uint256 _tokens) private { - Provision storage prov = _provisions[_serviceProvider][_verifier]; require(_tokens != 0, HorizonStakingInvalidZeroTokens()); + + Provision storage prov = _provisions[_serviceProvider][_verifier]; require(prov.createdAt != 0, HorizonStakingInvalidProvision(_serviceProvider, _verifier)); uint256 tokensIdle = _getIdleStake(_serviceProvider); require(_tokens <= tokensIdle, HorizonStakingInsufficientIdleStake(_tokens, tokensIdle)); diff --git a/packages/subgraph-service/contracts/libraries/LegacyAllocation.sol b/packages/subgraph-service/contracts/libraries/LegacyAllocation.sol index b2d751c5f..3d7f96213 100644 --- a/packages/subgraph-service/contracts/libraries/LegacyAllocation.sol +++ b/packages/subgraph-service/contracts/libraries/LegacyAllocation.sol @@ -54,8 +54,7 @@ library LegacyAllocation { ) internal { require(!self[allocationId].exists(), LegacyAllocationAlreadyExists(allocationId)); - State memory allocation = State({ indexer: indexer, subgraphDeploymentId: subgraphDeploymentId }); - self[allocationId] = allocation; + self[allocationId] = State({ indexer: indexer, subgraphDeploymentId: subgraphDeploymentId }); } /**