Skip to content

Fix wallet deletion audit issue#245

Merged
dDevAhmed merged 2 commits into
DigiNodes:mainfrom
Bug-Hunter-X:fix/181-wallet-deletion-audit
May 30, 2026
Merged

Fix wallet deletion audit issue#245
dDevAhmed merged 2 commits into
DigiNodes:mainfrom
Bug-Hunter-X:fix/181-wallet-deletion-audit

Conversation

@Bug-Hunter-X
Copy link
Copy Markdown

@Bug-Hunter-X Bug-Hunter-X commented May 28, 2026

Overview

This PR addresses issue #181 Missing Wallet deletion audit. It adds audit logging for wallet unlinking to ensure all wallet deletions are recorded in the audit trail.
closes #181

Objectives

  • Implement the missing audit logging when a wallet is unlinked.
  • Add unit tests verifying the audit entry is created.
  • Verify the implementation against existing protocol invariants and ensure no regressions.

Problem Context

During a recent audit it was discovered that wallet unlinking operations were not being logged, leaving a gap in traceability and security compliance.

Technical Scope

  • Updated src/identity/identity.service.ts to call AuditTrailService.log with a WALLET_UNLINKED action.
  • Added WALLET_UNLINKED to AuditActionType enum in src/audit/entities/audit-log.entity.ts.
  • Created unit test src/identity/identity.service.spec.ts to assert the audit log call.

Acceptance Criteria

  • Implementation: Wallet unlinking logs a WALLET_UNLINKED audit entry with appropriate metadata (wallet ID, user ID, address, description).
  • Tests: Unit test passes confirming the audit service is called.
  • No regressions: Existing tests continue to pass, and the application builds successfully.

Verification

  • npm run lint ✅ (existing repo warnings only)
  • npm run typecheck
  • npm test -- src/identity/identity.service.spec.ts --runInBand
  • npm run build

Security / Integrity Considerations

  • Audit entries include user ID and wallet address, but no sensitive private keys.
  • Logs are stored with standard audit security controls.

References

  • Internal Ref #BE-181

Labels

  • backend, stellar-wave, complexity-medium

@dDevAhmed
Copy link
Copy Markdown
Contributor

resolve conflicts @Bug-Hunter-X

@Bug-Hunter-X Bug-Hunter-X force-pushed the fix/181-wallet-deletion-audit branch from 04b6693 to e8ffb7b Compare May 30, 2026 19:42
@Bug-Hunter-X
Copy link
Copy Markdown
Author

@dDevAhmed done sir.

@dDevAhmed dDevAhmed merged commit 5c3a87b into DigiNodes:main May 30, 2026
4 of 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

Development

Successfully merging this pull request may close these issues.

Missing Wallet deletion audit

2 participants