Closed Meriem-BM closed 6 days ago
This update involves enhancing the findArchivedQfRounds
function in qfRoundRepository.ts
by integrating a new entity, ProjectFraud
. The changes specifically add a left join and a condition to exclude records associated with any fraud projects. This ensures that findArchivedQfRounds
excludes any rounds with detected fraudulent project activities, refining the data integrity of archived rounds.
File | Change Summary |
---|---|
.../repositories/qfRoundRepository.ts |
Introduced import for ProjectFraud and modified findArchivedQfRounds to include a leftJoin with ProjectFraud and filter out records with fraud. |
In code so neat, our work refined,
To fraud's deceit, we turned a blind,
Now archived rounds, pure and clear,
With every bound, we persevere.
Data shines bright, a rabbit's cheer,
Integrity in sight, we hold dear. 🌟🐇
src/repositories/qfRoundRepository.ts (2)
`13-13`: **Import statement for ProjectFraud added.** This import is necessary for the new functionality to exclude fraudulent projects from the query results. --- `145-159`: **Enhancements to `findArchivedQfRounds` function.** The modifications introduce joins with `Sybil` and `ProjectFraud` entities and add conditions to filter out records related to sybil attacks and fraudulent projects. This aligns with the PR objectives to enhance the reliability of the query results. - Ensure that the joins and conditions are correctly implemented and do not introduce any SQL performance issues, given the heavy nature of the query. - Verify that the field names and conditions used in the joins match the database schema.
Related to https://github.com/Giveth/giveth-dapps-v2/issues/4245#issuecomment-2194374221
PS: this query should be improved since it seems heavy, I'll do that once tests are passed.
Summary by CodeRabbit