-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathcommit_message.txt
More file actions
38 lines (27 loc) · 1.55 KB
/
commit_message.txt
File metadata and controls
38 lines (27 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
feat(backend): add transaction enrichment structuring with amount formatting and explorer links
## Summary
Implemented transaction response enrichment interceptor that formats raw database amounts into user-friendly displays and adds Stellar Expert exploration links.
## Changes
- **New Interceptor**: `TransactionFormattingInterceptor` in `common/interceptors/`
- Formats amounts: `"100000000"` → `"$100.00"` with proper USDC precision (7 decimals)
- Generates Stellar Expert links from transaction hashes
- Configurable asset mapping system
- **Module Updates**:
- `transactions.module.ts`: Added global interceptor provider
- `transaction-response.dto.ts`: Added `amountFormatted` and `explorerLinks` fields
- `transactions.service.ts`: Added asset ID extraction logic
## Acceptance Criteria ✅
- ✅ Construct explicit formatter logic attaching asset mapping symbols
- ✅ Evaluate Stellar contract precision parameters intelligently
- ✅ Render UI outputs exactly (e.g., `amountFormatted.display: "$500.00"`)
- ✅ Dynamically attach canonical Stellar Expert exploration links
## Files Changed
- `backend/src/common/interceptors/transaction-formatting.interceptor.ts` (new)
- `backend/src/modules/transactions/transactions.module.ts`
- `backend/src/modules/transactions/dto/transaction-response.dto.ts`
- `backend/src/modules/transactions/transactions.service.ts`
- `backend/src/common/interceptors/TRANSACTION_FORMATTING_README.md` (new)
## Testing
- ✅ `npm run build` passes
- ✅ TypeScript compilation successful
- ✅ Interceptor integration verified