Skip to content

Commit 8f2c5e7

Browse files
authored
Merge pull request #76 from Merit-Systems/fix/qaqa/I-01
Fix/qaqa/i 01
2 parents 907bff6 + d01f630 commit 8f2c5e7

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

libraries/Errors.sol

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,8 @@ pragma solidity =0.8.26;
33

44
library Errors {
55
string internal constant NOT_OWNER = "Not Owner";
6-
string internal constant NOT_SUPPORTED = "Not Supported";
7-
string internal constant ALREADY_INITIALIZED = "Already Initialized";
8-
string internal constant LENGTH_MISMATCH = "Length Mismatch";
9-
string internal constant ZERO_SHARE = "Zero Share";
10-
string internal constant NO_TIME_ELAPSED = "No Time Elapsed";
11-
string internal constant NO_NEW_MINTED_SHARES = "No New Minted Shares";
12-
string internal constant NO_PULL_REQUESTS = "No Pull Requests";
13-
string internal constant NO_WEIGHTS = "No Weights";
14-
string internal constant NOT_INITIALIZED = "Not Initialized";
15-
string internal constant NOT_ACCOUNT_OWNER = "Not Account Owner";
166
string internal constant ALREADY_CLAIMED = "Already Claimed";
17-
string internal constant INVALID_PROOF = "Invalid Proof";
18-
string internal constant INVALID_ROOT = "Invalid Root";
19-
string internal constant NO_CONTRIBUTORS = "No Contributors";
20-
string internal constant TOO_MANY_CONTRIBUTORS = "Too Many Contributors";
21-
string internal constant TOO_MANY_PULL_REQUESTS = "Too Many Pull Requests";
22-
string internal constant NO_PAYMENT_PERMISSION = "No Payment Permission";
7+
string internal constant NO_CLAIM_PERMISSION = "No Payment Permission";
238
string internal constant CLAIM_EXPIRED = "Claim Expired";
249
string internal constant STILL_CLAIMABLE = "Still Claimable";
2510
string internal constant INVALID_SIGNATURE = "Invalid Signature";
@@ -36,4 +21,5 @@ library Errors {
3621
string internal constant INVALID_AMOUNT_AFTER_FEE = "Invalid Amount After Fee";
3722
string internal constant INVALID_BATCH_DEPOSIT_LIMIT = "Invalid Batch Deposit Limit";
3823
string internal constant BATCH_DEPOSIT_LIMIT_EXCEEDED = "Batch Deposit Limit Exceeded";
24+
string internal constant EMPTY_BATCH = "Empty Batch";
3925
}

src/Escrow.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ contract Escrow is Owned, IEscrow {
131131
external
132132
returns (uint[] memory depositIds)
133133
{
134+
require(params.length > 0, Errors.EMPTY_BATCH);
134135
require(params.length <= batchDepositLimit, Errors.BATCH_DEPOSIT_LIMIT_EXCEEDED);
135136
depositIds = new uint[](params.length);
136137

@@ -155,7 +156,7 @@ contract Escrow is Owned, IEscrow {
155156
bytes32 s
156157
) external {
157158
setCanClaim(recipient, status, deadline, v, r, s);
158-
require(canClaim[recipient], Errors.NO_PAYMENT_PERMISSION);
159+
require(canClaim[recipient], Errors.NO_CLAIM_PERMISSION);
159160
_claim(depositId, recipient);
160161
}
161162

@@ -170,7 +171,7 @@ contract Escrow is Owned, IEscrow {
170171
bytes32 s
171172
) external {
172173
setCanClaim(recipient, status, deadline, v, r, s);
173-
require(canClaim[recipient], Errors.NO_PAYMENT_PERMISSION);
174+
require(canClaim[recipient], Errors.NO_CLAIM_PERMISSION);
174175

175176
for (uint256 i = 0; i < depositIds.length; i++) {
176177
_claim(depositIds[i], recipient);

0 commit comments

Comments
 (0)