Skip to content

feat: build refund management service#423

Merged
devEunicee merged 1 commit into
devEunicee:mainfrom
ZainabJanee:feature/274-refund-management-service
Jun 27, 2026
Merged

feat: build refund management service#423
devEunicee merged 1 commit into
devEunicee:mainfrom
ZainabJanee:feature/274-refund-management-service

Conversation

@ZainabJanee

Copy link
Copy Markdown
Contributor

Summary

Implements the refund management service as described in #274.

Changes

  • services/refund-management/src/lib.rs — standalone Rust service with the full refund lifecycle
  • services/refund-management/Cargo.toml — isolated crate (outside the Soroban workspace)

Acceptance Criteria Met

  • Refund initiation with validation (amount > 0, amount ≤ remaining, 30-day window)
  • Approval/rejection workflow
  • Execution within 48-hour grace period after approval
  • State transition validation (Pending→Approved/Rejected/Cancelled, Approved→Executed)
  • Grace period enforcement
  • Cancellation support
  • Audit logging for every state change
  • Event emission on state changes (RefundEvent enum)

Tests

9 unit tests covering: happy path, duplicate ID, amount overflow, expired window, invalid transitions, list-by-order.

Closes #274

- Refund initiation with 30-day window and amount validation
- Approve/reject workflow with audit logging
- Execute within 48-hour grace period after approval
- Cancellation support for pending refunds
- State transition enforcement (Pending→Approved/Rejected/Cancelled, Approved→Executed)
- Full audit log of all state-change events
- Unit tests covering happy path, edge cases, and invalid transitions

Closes devEunicee#274
@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@ZainabJanee 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

@devEunicee devEunicee merged commit d296f23 into devEunicee:main Jun 27, 2026
4 of 9 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.

#274 - Build Refund Management Service

2 participants