Skip to content

add transaction lifecycle service#519

Merged
milah-247 merged 2 commits intomilah-247:mainfrom
Jayking40:main
Apr 1, 2026
Merged

add transaction lifecycle service#519
milah-247 merged 2 commits intomilah-247:mainfrom
Jayking40:main

Conversation

@Jayking40
Copy link
Copy Markdown
Contributor

[Backend] Feature: Transaction Service

Summary

Implemented a transaction lifecycle service for the backend so transaction writes are validated consistently, transaction history can be queried with richer filters, and merchants can manage refunds, reconciliation, and reporting from the same transaction domain model.

Changes

  • Added a dedicated transaction service layer to centralize validation, Stellar verification, history filtering, merchant-scoped queries, refunds, reconciliation, and reporting logic.
  • Extended transaction persistence to support lifecycle fields such as status, reconciliation timestamps, refund linkage, refund reasons, and metadata while preserving existing transaction flows.
  • Expanded the transactions API with merchant history, reporting, refund, and reconciliation endpoints, and updated tests to cover the new lifecycle behaviour and fallback paths.

Testing

  • Unit tests written for:

  • Transaction service validation and lifecycle flows

  • Transaction routes and user history route behaviour

  • Repository round-trip, nullability, merchant isolation, and Horizon fallback cases

  • Edge cases covered:

  • Duplicate transaction recording

  • Invalid wallet addresses, invalid amounts, and reversed date ranges

  • Refund ownership checks and invalid refund targets

  • Horizon failure with database fallback

  • Merchant-scoped filtering and reconciliation/report filters

  • Manual testing steps (if applicable):

  • Ran targeted backend Jest suites for the transaction service, routes, repositories, property tests, and Horizon fallback flow

  • Ran focused ESLint checks on the touched transaction files


Closes #352

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

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

@milah-247
Copy link
Copy Markdown
Owner

@Jayking40 you pushed from main

@milah-247
Copy link
Copy Markdown
Owner

You have conflict

@milah-247
Copy link
Copy Markdown
Owner

milah-247 commented Mar 30, 2026

@Jayking40 you're pushing from main not branch

@milah-247
Copy link
Copy Markdown
Owner

Push from your branch not main

@milah-247 milah-247 merged commit 64093e6 into milah-247:main Apr 1, 2026
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.

[Backend] Feature: Transaction Service

2 participants