Skip to content

Commit

Permalink
fixed insertAvatar
Browse files Browse the repository at this point in the history
  • Loading branch information
koeppelmann authored Jan 31, 2024
1 parent cd2d368 commit ac32559
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/multitoken-graph/Hub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ contract Hub is ERC1155 {
}

function insertAvatar(address avatar) internal {
avatars[avatar] = avatars[SENTINEL];
avatars[SENTINEL] = avatar;
avatars[avatar] = SENTINEL;
}

function registerGroup(address _treasury, string calldata _name, string calldata _symbol) external {
require(avatars[msg.sender] == address(0));
_registerGroup(msg.sender, standardGroupMint, _treasury, _name, _symbol);
}

Expand All @@ -121,8 +122,8 @@ contract Hub is ERC1155 {
}

function registerOrganization(string calldata _name) external {
require(avatars[msg.sender] == address(0));
insertAvatar(msg.sender);
lastMintTimes[msg.sender] = 0;
}

function trust(address _trustReceiver, uint256 _expiry) external {
Expand Down

0 comments on commit ac32559

Please sign in to comment.