[MEX-748] Implement Claim Rewards notifications in xPortal#1598
[MEX-748] Implement Claim Rewards notifications in xPortal#1598claudiulataretu merged 24 commits intofeat/push-notifications-systemfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a new feature to xPortal that enables dapps to send push notifications about claimable rewards on a weekly cadence. It introduces a notifications module with its related services, models, and configuration updates, as well as integrating the new module into the application bootstrap.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/modules/push-notifications/services/push.notifications.setter.service.ts | Implements caching and updating of user energy addresses for notifications |
| src/modules/push-notifications/push.notifications.service.ts | Contains the notification sending logic with a weekly cron job and retry mechanism |
| src/modules/push-notifications/push.notifications.module.ts | Organizes notifications-related services into a dedicated module |
| src/modules/push-notifications/models/push.notifications.model.ts | Defines data models used for energy details and notifications payloads |
| src/main.ts | Integrates the notifications module into the main bootstrap process |
| src/helpers/api.config.service.ts | Adds configuration getters for notifications API url, key, batch size, max retries, chainId, and module activation |
Files not reviewed (1)
- .env.example: Language not supported
Comments suppressed due to low confidence (1)
src/modules/push-notifications/push.notifications.service.ts:238
- [nitpick] Consider logging the full error object to capture the complete stack trace for debugging purposes rather than just error.message.
this.logger.error('Error in notification cron job:', error.message);
src/services/multiversx-communication/mx.xportal.api.service.ts
Outdated
Show resolved
Hide resolved
src/modules/push-notifications/crons/push.notifications.energy.ts
Outdated
Show resolved
Hide resolved
src/modules/push-notifications/services/push.notifications.service.ts
Outdated
Show resolved
Hide resolved
src/modules/push-notifications/models/push.notifications.types.ts
Outdated
Show resolved
Hide resolved
src/modules/push-notifications/services/push.notifications.service.ts
Outdated
Show resolved
Hide resolved
src/modules/push-notifications/services/push.notifications.service.ts
Outdated
Show resolved
Hide resolved
src/services/multiversx-communication/mx.xportal.api.service.ts
Outdated
Show resolved
Hide resolved
src/services/multiversx-communication/mx.xportal.api.service.ts
Outdated
Show resolved
Hide resolved
src/modules/push-notifications/crons/push.notifications.energy.ts
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #1598 +/- ##
===============================================
- Coverage 53.07% 52.86% -0.22%
===============================================
Files 279 281 +2
Lines 10947 11036 +89
Branches 875 881 +6
===============================================
+ Hits 5810 5834 +24
- Misses 4353 4412 +59
- Partials 784 790 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/modules/push-notifications/services/push.notifications.service.ts
Outdated
Show resolved
Hide resolved
src/modules/push-notifications/services/push.notifications.setter.service.ts
Outdated
Show resolved
Hide resolved
src/modules/push-notifications/crons/push.notifications.energy.ts
Outdated
Show resolved
Hide resolved
7ff70ed
into
feat/push-notifications-system
Reasoning
Proposed Changes
How to test