Commit 98aaf59
committed
fix: resolve merge regressions and Prisma type gaps in transactions/auth services (#891)
- Restore two try blocks left without catch handlers after merging main
(transactions.service.ts: recordOnBlockchain, verifyOnBlockchain)
- Remove duplicate/conflicting 'updated' declaration in update()
- Restore transaction-not-found check dropped from update() during the merge
- Restore nextCursor/previousCursor pagination fields dropped from findAll()
during the merge
- Fix TypeScript errors from Prisma client not re-exporting model types
and enums under the Prisma namespace in this generator version
(Transaction, TransactionTaxStrategy, TransactionType, TransactionStatus
in transactions.service.ts; BlacklistedToken, Document, ApiKey,
PasswordHistory in auth.service.ts)
- Add explicit guard rejecting TransactionStatusDto.FAILED, which has no
corresponding value in the Prisma schema's TransactionStatus enum
- Use existing this.toNumber() helper for Decimal conversion instead of
calling .toNumber() directly, matching the pattern already used in
getAnalytics()
- Normalize nullable Prisma fields (blockchainHash, contractAddress,
notes) to undefined to match TransactionResponseDto's optional fields
- Remove remaining 'as any' cast in findAll()'s cursor construction
- Fix misplaced docstring on updateEscrow() and restore its unused-param
lint suppression1 parent 13b6d46 commit 98aaf59
2 files changed
Lines changed: 132 additions & 109 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
| 518 | + | |
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| |||
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
799 | | - | |
| 799 | + | |
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
| |||
1081 | 1081 | | |
1082 | 1082 | | |
1083 | 1083 | | |
1084 | | - | |
| 1084 | + | |
1085 | 1085 | | |
1086 | 1086 | | |
1087 | 1087 | | |
| |||
1451 | 1451 | | |
1452 | 1452 | | |
1453 | 1453 | | |
1454 | | - | |
| 1454 | + | |
1455 | 1455 | | |
1456 | 1456 | | |
1457 | 1457 | | |
| |||
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
1598 | | - | |
| 1598 | + | |
1599 | 1599 | | |
1600 | 1600 | | |
1601 | 1601 | | |
| |||
0 commit comments