Closed RamRamez closed 1 week ago
The recent updates enhance the robustness of the NotificationCenterAdapter
, streamline project verification logic, and update testing criteria to meet current standards. Key revisions include handling user fields more gracefully, refining project status queries, and optimizing cron job functionalities and their tests for better accuracy and efficiency.
File Path | Change Summary |
---|---|
src/adapters/notifications/NotificationCenterAdapter.ts |
Updated user.walletAddress to user?.walletAddress and ensured robust handling of project.adminUser in notification methods. |
src/repositories/projectRepository.ts |
Enhanced query in projectsWithoutUpdateAfterTimeFrame to filter by additional project statuses and corrected query syntax. |
src/services/cronJobs/checkProjectVerificationStatus.ts |
Refactored logic for project verification status and notification handling, removed outdated imports and unnecessary code. |
src/services/cronJobs/checkProjectVerificationStatus.test.ts |
Adjusted test case dates using moment.js for precise date calculation. |
sequenceDiagram
participant User
participant NotificationCenterAdapter
participant ProjectRepository
User->>NotificationCenterAdapter: Trigger Notification Methods
NotificationCenterAdapter->>ProjectRepository: Fetch Project Details
ProjectRepository->>NotificationCenterAdapter: Return Project Details with Updated Filters
NotificationCenterAdapter->>User: Send Notification
User->>CronJob: Trigger Project Verification Check
CronJob->>ProjectRepository: Check Project Updates
ProjectRepository->>CronJob: Return Project Update Details
CronJob->>NotificationCenterAdapter: Notify User if Necessary
From codes to flows, a rabbit's delight, Projects verified, now shining bright. Wallets addressed with careful grace, Notifications sent without a trace. A system refined, precise and neat, In code's warm embrace, we proudly meet. 🐇✨
src/services/cronJobs/checkProjectVerificationStatus.test.ts (1)
`28-31`: Proper use of `.toDate()` ensures the `projectUpdateCreationDate` is a JavaScript Date object, enhancing type safety and consistency.
Summary by CodeRabbit
Bug Fixes
Refactor
Tests