feat: implement wallet management, notification preferences, referral…#577
Merged
Devsol-01 merged 1 commit intoDevsol-01:mainfrom Mar 30, 2026
Conversation
… dashboard, and GDPR data export APIs Closes Devsol-01#524 - User Wallet Management API - Add UserWallet entity with multi-wallet support per user - POST /users/wallets/link with Stellar signature verification - DELETE /users/wallets/:address/unlink - GET /users/wallets to list all linked wallets - PATCH /users/wallets/:address/set-primary - Duplicate wallet prevention across users - EventEmitter events for wallet.linked, wallet.unlinked, wallet.primaryChanged Closes Devsol-01#525 - User Notification Preferences API - Enhance NotificationPreference entity with granular controls - Channel prefs: email, in-app, push, SMS - Type prefs: deposits, withdrawals, goals, governance, marketing - Quiet hours: enabled flag, start/end time (HH:MM), timezone - Digest frequency: instant | daily | weekly - New controller at GET/PATCH /users/notifications/preferences - Backward-compatible with existing preference columns Closes Devsol-01#528 - User Referral Dashboard API - GET /users/referrals/stats with dashboard metrics (referralCode, totalReferrals, successfulReferrals, pendingRewards, claimedRewards, rank) - POST /users/referrals/code/generate for custom referral codes - GET /users/referrals/history with conversion funnel data - GET /users/referrals/leaderboard for top referrers Closes Devsol-01#529 - User Export Data API (GDPR Compliance) - POST /users/data/export triggers async ZIP generation - Includes profile, transactions, savings goals, notifications as JSON files - GET /users/data/export/:requestId/status to poll progress - GET /users/data/export/download/:token for secure download - Links expire after 7 days; email notification on completion - All export requests logged for compliance - Migration 1796000000000 for user_wallets, notification_preferences columns, data_export_requests
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Haroldwonder Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#524 — User Wallet Management API
Adds full multi-wallet support for Stellar addresses.
New files: user-wallet.entity.ts, wallet.service.ts, wallet.controller.ts,
link-wallet.dto.ts
Endpoints:
signature over a provided message
while others exist
Duplicate wallet linking across users is prevented at both the service and DB level (unique
constraint). Events emitted: wallet.linked, wallet.unlinked, wallet.primaryChanged.
closes #524
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#525 — User Notification Preferences API
Extends the existing NotificationPreference entity with granular controls and adds a
dedicated route prefix.
Changes: notification-preference.entity.ts, update-notification-preference.dto.ts, new
user-notifications.controller.ts
New fields:
governanceNotifications, marketingNotifications
timezone
Endpoints:
All existing preference columns are preserved for backward compatibility.
closes #525
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#528 — User Referral Dashboard API
Adds a user-facing referral dashboard with stats, custom code generation, history, and
leaderboard.
New files: user-referrals.controller.ts
Modified: referrals.service.ts, referral.dto.ts
Endpoints:
pendingRewards, claimedRewards, rank
or auto-generates one
deposit → reward)
referrals
closes #528
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#529 — User Export Data API (GDPR Compliance)
Implements async data portability export with secure time-limited download links.
New module: data-export/ (entity, service, controller, DTO)
Endpoints:
Accepted)
pending | processing | ready | expired | failed)
required)
Export ZIP contains: profile.json, transactions.json, goals.json, notifications.json
Download links expire after 7 days. The user receives an email with the download URL when
the export is ready. All requests are persisted in data_export_requests for compliance
audit.
closes #529
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Migration
1796000000000-CreateUserWalletsAndDataExport.ts creates:
Dependencies added