fix check an active request (#1200)

This commit is contained in:
Dev Kalra 2023-12-21 15:50:47 +05:30 committed by GitHub
parent 3565ee627e
commit 6463f1a98f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -241,9 +241,12 @@ abstract contract Entropy is IEntropy, EntropyState {
provider,
sequenceNumber
);
// Check that there is a request for the given provider / sequence number.
if (req.provider != provider || req.sequenceNumber != sequenceNumber)
revert EntropyErrors.NoSuchRequest();
// Check that there is an active request for the given provider / sequence number.
if (
req.sequenceNumber == 0 ||
req.provider != provider ||
req.sequenceNumber != sequenceNumber
) revert EntropyErrors.NoSuchRequest();
if (req.requester != msg.sender) revert EntropyErrors.Unauthorized();