diff --git a/src/circles/Circles.sol b/src/circles/Circles.sol index 45d2c63..4174b2a 100644 --- a/src/circles/Circles.sol +++ b/src/circles/Circles.sol @@ -185,14 +185,12 @@ contract Circles is ERC1155, ICirclesErrors { discountedTotalSupplies[_id] = totalSupplyBalance; } - // Private functions - /** * @dev Max function to compare two values. * @param a Value a * @param b Value b */ - function _max(uint256 a, uint256 b) private pure returns (uint256) { + function _max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } } diff --git a/src/hub/Hub.sol b/src/hub/Hub.sol index b99a4a9..c669faa 100644 --- a/src/hub/Hub.sol +++ b/src/hub/Hub.sol @@ -1117,7 +1117,9 @@ contract Hub is Circles, TypeDefinitions, IHubErrors { // to avoid possible overlap of the mint between Hub v1 and Hub v2 if (mintTime.mintV1Status != _mintV1Status) { mintTime.mintV1Status = _mintV1Status; - mintTime.lastMintTime = uint96(block.timestamp); + // for last mint time take the maximum to avoid resetting "INDEFINITE_FUTURE" + // which indicates stopped status of the human + mintTime.lastMintTime = uint96(_max(mintTime.lastMintTime, uint96(block.timestamp))); } }