Skip to content

Commit de26f6c

Browse files
authored
Merge pull request #31 from Synaps3Protocol/codex/conduct-a-security-audit
Cache owner before burning revoked assets
2 parents a73c156 + 22497d3 commit de26f6c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

contracts/assets/AssetOwnership.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@ contract AssetOwnership is
134134
/// @dev This action is irreversible and restricted to governance control.
135135
/// @param assetId The unique identifier of the asset to be revoked.
136136
function revoke(uint256 assetId) external restricted {
137+
address previousOwner = ownerOf(assetId);
138+
137139
_burn(assetId);
138140
_disableAsset(assetId);
139-
emit RevokedAsset(ownerOf(assetId), assetId);
141+
emit RevokedAsset(previousOwner, assetId);
140142
}
141143

142144
/// @notice Transfers an asset to a new owner.

0 commit comments

Comments
 (0)