Skip to content

Commit

Permalink
Merge pull request #78 from CirclesUBI/20240129-erc1155-evaluation
Browse files Browse the repository at this point in the history
fixed insertAvatar
  • Loading branch information
benjaminbollen authored Feb 1, 2024
2 parents b9ad21b + ac32559 commit db7dd80
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 db7dd80

Please sign in to comment.