Skip to content

Commit

Permalink
Merge branch 'main' into better-calldata-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
hensha256 authored Aug 30, 2024
2 parents ae6a374 + 6fd7e1f commit 2a085f2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/base/Notifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ abstract contract Notifier is INotifier {
if (_subscriber != NO_SUBSCRIBER) revert AlreadySubscribed(address(_subscriber));
subscriber[tokenId] = ISubscriber(newSubscriber);

bool success =
_call(address(newSubscriber), abi.encodeCall(ISubscriber.notifySubscribe, (tokenId, config, data)));
bool success = _call(newSubscriber, abi.encodeCall(ISubscriber.notifySubscribe, (tokenId, config, data)));

if (!success) {
Wrap__SubsciptionReverted.selector.bubbleUpAndRevertWith(address(newSubscriber));
Wrap__SubsciptionReverted.selector.bubbleUpAndRevertWith(newSubscriber);
}

emit Subscribed(tokenId, address(newSubscriber));
emit Subscribed(tokenId, newSubscriber);
}

/// @inheritdoc INotifier
Expand Down

0 comments on commit 2a085f2

Please sign in to comment.