Skip to content

feat: add soft-delete - #1741

Merged
Olowodarey merged 1 commit into
Arena1X:mainfrom
ONEONUORA:Soft-Delete
Aug 26, 2026
Merged

feat: add soft-delete#1741
Olowodarey merged 1 commit into
Arena1X:mainfrom
ONEONUORA:Soft-Delete

Conversation

@ONEONUORA

Copy link
Copy Markdown
Contributor

close #1599
close #1645
close #1643
close #1641

Summary of Changes

This PR resolves several key feature enhancements and moderation requirements across the frontend and backend.


1. Smart Contracts UI & Explorer Deep Links

  • Copy-to-Clipboard: Added per-address copy button with visual feedback (Copied!) in frontend/src/app/contracts/page.tsx.
  • Network-Aware Links: Integrated Stellar Explorer deep links matching testnet or mainnet based on environment configuration (frontend/src/lib/env.ts).
  • Tests: Added tests in frontend/src/app/contracts/page.test.tsx verifying copy handler execution and correct URL formatting.

2. Moderation & User Flags Workflow

  • Admin Workflow Endpoints: Added GET /flags (list open/submitted flags) and PATCH /flags/:id/resolve (resolve with action and admin notes) in backend/src/flags/flags.controller.ts.
  • Role Access Controls: Enforced @Roles(Role.Admin) and RolesGuard to restrict moderation review and resolution strictly to admins.
  • Tests: Added unit tests in backend/src/flags/flags.controller.spec.ts for lifecycle transitions and admin access guards.

3. User Referrals & Attribution

  • Single Attribution: Enforced once-only referral attribution on user registration via claimReferral in backend/src/users/users.service.ts.
  • Reward Qualification: Wired recordQualifyingAction to advance referral state from PENDING to QUALIFIED upon referee activation.
  • Tests: Validated referral attribution deduplication, self-referral guards, and reward trigger logic in backend/src/users/users.service.spec.ts.

4. Soft-Delete Exclusion & Data Export

  • Soft-Delete Filtering: Updated findAll, findById, and findByAddress in backend/src/users/users.service.ts to exclude soft-deleted users (deleted_at IS NULL).
  • Data Export Artifacts: Integrated GDPR user data export generation and download endpoints (/account/export).
  • Tests: Expanded unit tests in backend/src/users/users.service.spec.ts covering soft-delete exclusion logic.

Verification

  • All 104 backend test suites (1,357 tests) passed.
  • Frontend contract page copy and explorer link tests passed.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@ONEONUORA 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! 🚀

Learn more about application limits

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview Aug 26, 2026 7:17pm

@Olowodarey
Olowodarey merged commit 695d7a7 into Arena1X:main Aug 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants