Skip to content

Commit

Permalink
revert _getName() changes
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Sep 19, 2022
1 parent 4a32566 commit 07404c4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions contracts/SoulName.sol
Expand Up @@ -167,7 +167,7 @@ contract SoulName is NFT, ISoulName {
for (uint256 i = 0; i < balance; i++) {
uint256 tokenId = tokenOfOwnerByIndex(owner, i);
string memory name = tokenIdToName[tokenId];
sbtNames[i] = _getName(name);
sbtNames[i] = name;
}

return sbtNames;
Expand Down Expand Up @@ -212,11 +212,7 @@ contract SoulName is NFT, ISoulName {
}

function _getName(string memory name) private view returns (string memory) {
string memory lowercaseName = _toLowerCase(name);
SoulNameData memory soulNameData = soulNames[lowercaseName];
require(bytes(soulNameData.name).length > 0, "NAME_NOT_FOUND");

return string(bytes.concat(bytes(soulNameData.name), bytes(extension)));
return string(bytes.concat(bytes(name), bytes(extension)));
}

/* ========== MODIFIERS ========== */
Expand Down

0 comments on commit 07404c4

Please sign in to comment.