Skip to content

Commit

Permalink
Dont consider donor's passportScore in qfRoundHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadranjbarz committed Jul 2, 2023
1 parent fcdc0ec commit a6b28b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/repositories/qfRoundHistoryRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function fillQfRoundHistoryTestCases() {
});
assert.isNull(foundQfRoundHistory);
});
it('should not count donations from users that their passportScore is lower than qfRound.minimumPassportScore', async () => {
it('should not cconsider donors passport score', async () => {
const user1 = await saveUserDirectlyToDb(generateRandomEtheriumAddress());
user1.passportScore = 6;
const user2 = await saveUserDirectlyToDb(generateRandomEtheriumAddress());
Expand Down Expand Up @@ -284,8 +284,8 @@ function fillQfRoundHistoryTestCases() {
qfRoundId: qfRound.id,
});
assert.isOk(foundQfRoundHistory);
assert.equal(foundQfRoundHistory?.uniqueDonors, 1);
assert.equal(foundQfRoundHistory?.raisedFundInUsd, 15);
assert.equal(foundQfRoundHistory?.uniqueDonors, 2);
assert.equal(foundQfRoundHistory?.raisedFundInUsd, 25);
});
it('should not count unverified donations', async () => {
const user = await saveUserDirectlyToDb(generateRandomEtheriumAddress());
Expand Down
1 change: 0 additions & 1 deletion src/repositories/qfRoundHistoryRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const fillQfRoundHistory = async (): Promise<void> => {
WHERE
qr."isActive" = false AND
qr."endDate" < NOW() AND
u."passportScore" >= qr."minimumPassportScore" AND
d.status = 'verified'
GROUP BY d."projectId", d."qfRoundId"
ON CONFLICT ("projectId", "qfRoundId") DO NOTHING;
Expand Down

0 comments on commit a6b28b5

Please sign in to comment.