Skip to content

Commit

Permalink
fix: πŸ› requestAllocateDatacap check if matched
Browse files Browse the repository at this point in the history
βœ… Closes: #363
  • Loading branch information
siriusyim committed Mar 29, 2024
1 parent f90a9fe commit c547bde
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/v0.8/module/storage/Storages.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ contract Storages is
uint64[] memory _ids,
uint64[] memory _claimIds
) external {
require(
MatchingType.State.Completed ==
roles.matchings().getMatchingState(_matchingId),
"invalid matching state"
);

require(isStorageExpiration(_matchingId) != true, "Storage expiration");
if (_ids.length != _claimIds.length) {
revert Errors.ParamLengthMismatch(_ids.length, _claimIds.length);
Expand Down Expand Up @@ -322,6 +328,12 @@ contract Storages is
validNextDatacapAllocation(this, _matchingId)
returns (uint64)
{
require(
MatchingType.State.Completed ==
roles.matchings().getMatchingState(_matchingId),
"invalid matching state"
);

(
,
,
Expand Down

0 comments on commit c547bde

Please sign in to comment.