From ac325590a58abf73933b93a4c960ad78aa0ac56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=B6ppelmann?= Date: Thu, 1 Feb 2024 00:31:14 +0100 Subject: [PATCH] fixed insertAvatar --- src/multitoken-graph/Hub.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/multitoken-graph/Hub.sol b/src/multitoken-graph/Hub.sol index 4903de9..d5e3e4a 100644 --- a/src/multitoken-graph/Hub.sol +++ b/src/multitoken-graph/Hub.sol @@ -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); } @@ -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 {