Skip to content

Commit

Permalink
onlyChannelOwner modification
Browse files Browse the repository at this point in the history
  • Loading branch information
zaryab2000 committed Jan 9, 2024
1 parent 4df4806 commit 68e452e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions contracts/PushCore/PushCoreV2_5.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,12 @@ contract PushCoreV2_5 is Initializable, PushCoreStorageV1_5, PausableUpgradeable

function onlyChannelOwner(address _channel) private view {
if (
(
(channels[_channel].channelState != 1 || msg.sender != _channel)
|| (msg.sender != pushChannelAdmin && _channel == address(0x0))
)
!((channels[_channel].channelState == 1 && msg.sender == _channel) ||
(msg.sender == pushChannelAdmin && _channel == address(0x0)))
) {
revert Errors.UnauthorizedCaller(msg.sender);
}
}

function addSubGraph(bytes calldata _subGraphData) external {
onlyActivatedChannels(msg.sender);
emit AddSubGraph(msg.sender, _subGraphData);
Expand Down

0 comments on commit 68e452e

Please sign in to comment.