Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/erc721pool interaction test #41

Merged
merged 5 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/factories/ERC721PenaltyFeeFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ contract ERC721PenaltyFeeStakingFactory is Ownable, IPenaltyFeeFactory {
PenaltyFeeRequest storage req = requests[id];
if (msg.sender != req.info.deployer) revert InvalidCaller();
if (
req.info.requestStatus != Status.CREATED ||
req.info.requestStatus != Status.CREATED &&
req.info.requestStatus != Status.APPROVED
) revert InvalidRequestStatus();
req.info.requestStatus = Status.CANCELED;
Expand All @@ -121,4 +121,4 @@ contract ERC721PenaltyFeeStakingFactory is Ownable, IPenaltyFeeFactory {
function getPools() external view returns (address[] memory pools) {
pools = stakingPools;
}
}
}
2 changes: 2 additions & 0 deletions contracts/pools/ERC721/ERC721LockUpStakingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ contract ERC721LockUpPool is
function unstake(uint256[] calldata tokenIds) external nonReentrant {
uint256 length = tokenIds.length;
if (length == 0) revert InvalidAmount();
if (block.timestamp < pool.unstakeLockUpTime)
revert TokensInLockUp(block.timestamp, pool.unstakeLockUpTime);
UserInfo storage user = userInfo[msg.sender];
uint256 currentAmount = user.amount;
if (length > currentAmount)
Expand Down
Loading
Loading