Skip to content

Commit

Permalink
if the last owner of the name is burning it, remove the name from nam…
Browse files Browse the repository at this point in the history
…eData
  • Loading branch information
miquelcabot committed Sep 22, 2022
1 parent fd0e831 commit 3a9c5eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/SoulName.sol
Expand Up @@ -188,8 +188,10 @@ contract SoulName is NFT, ISoulName {
// remove info from tokenIdName and tokenData
delete tokenData[tokenId];

// TODO: if it's the current valid soul name
delete nameData[lowercaseName];
// if the last owner of the name is burning it, remove the name from nameData
if (nameData[lowercaseName].tokenId == tokenId) {
delete nameData[lowercaseName];
}
_removeFromIdentityNames(identityId, lowercaseName);

super.burn(tokenId);
Expand Down

0 comments on commit 3a9c5eb

Please sign in to comment.