@@ -84,7 +84,9 @@ contract Asset is Ownable, ReentrancyGuard, IAsset {
8484 event CreatorFeeClaimedBatch (bytes32 [] indexed subscribers , uint256 totalAmount );
8585 event SubscriptionPriceUpdated (uint256 newSubscriptionPrice );
8686 event SubscriptionRevoked (bytes32 indexed subscriber , uint256 indexed nonce , uint256 indexed endTime , bool removed );
87- event SubscriptionCancelled (bytes32 indexed subscriber , uint256 indexed nonce , uint256 indexed endTime , bool removed );
87+ event SubscriptionCancelled (
88+ bytes32 indexed subscriber , uint256 indexed nonce , uint256 indexed endTime , bool removed
89+ );
8890
8991 /// @notice Initializes the asset with id, price, payment token, and owner.
9092 /// Callable only by the registry (msg.sender).
@@ -524,10 +526,7 @@ contract Asset is Ownable, ReentrancyGuard, IAsset {
524526 emit SubscriptionRevoked (subscriber, nonce, endTime, removed);
525527 }
526528
527- function cancelSubscription (string memory subscriberId , bytes memory signature )
528- external
529- nonReentrant
530- {
529+ function cancelSubscription (string memory subscriberId , bytes memory signature ) external nonReentrant {
531530 bytes32 subscriber = _hash (subscriberId, msg .sender );
532531
533532 bytes32 hash = _signatureHash (block .chainid , address (this ), subscriber);
@@ -553,7 +552,11 @@ contract Asset is Ownable, ReentrancyGuard, IAsset {
553552 return result;
554553 }
555554
556- function _signatureHash (uint256 chainId , address assetAddress , bytes32 subscriber ) internal pure returns (bytes32 result ) {
555+ function _signatureHash (uint256 chainId , address assetAddress , bytes32 subscriber )
556+ internal
557+ pure
558+ returns (bytes32 result )
559+ {
557560 result = keccak256 (abi.encodePacked (chainId, assetAddress, subscriber));
558561 return result;
559562 }
0 commit comments