Skip to content

Commit

Permalink
chore: adherence to CEI in unsubscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Aug 26, 2024
1 parent d325f82 commit cbd953f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base/Notifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ abstract contract Notifier is INotifier {
_positionConfigs(tokenId).setUnsubscribe();
ISubscriber _subscriber = subscriber[tokenId];

uint256 subscriberGasLimit = block.gaslimit.calculatePortion(BLOCK_LIMIT_BPS);
delete subscriber[tokenId];

uint256 subscriberGasLimit = block.gaslimit.calculatePortion(BLOCK_LIMIT_BPS);
try _subscriber.notifyUnsubscribe{gas: subscriberGasLimit}(tokenId, config, data) {} catch {}

delete subscriber[tokenId];
emit Unsubscribed(tokenId, address(_subscriber));
}

Expand Down

0 comments on commit cbd953f

Please sign in to comment.