Skip to content

feat: resolve issues #599, #600, #601, #602#609

Open
Chuks-coderr wants to merge 1 commit into
accesslayerorg:mainfrom
Chuks-coderr:feature/issues-599-600-601-602
Open

feat: resolve issues #599, #600, #601, #602#609
Chuks-coderr wants to merge 1 commit into
accesslayerorg:mainfrom
Chuks-coderr:feature/issues-599-600-601-602

Conversation

@Chuks-coderr

Copy link
Copy Markdown

#600 — Add maskSensitive helper for structured log calls

  • Add src/utils/mask-sensitive.utils.ts: maskSensitive(obj) recursively redacts url, callback, address, webhook_url, recipient keys to [REDACTED]
  • Add unit tests (mask-sensitive.utils.test.ts): 30 cases covering all sensitive key names, non-sensitive keys unchanged, nested recursion, array elements, immutability, case-insensitivity
  • Apply maskSensitive to the structured log call in wallet-activity.controllers.ts

#599 — Add integration test for trade history date range filter

  • Extend WalletActivityQuerySchema with optional from/to ISO datetime params
  • Update fetchWalletActivity to build Prisma createdAt.gte / .lte filter when from / to are supplied
  • Add wallet-activity-date-filter.integration.test.ts: 11 mock-based tests covering inside/before/after range, boundary inclusivity, Prisma where clause shape, and empty-range result

#601 — Add integration test for fan portfolio aggregating holdings

  • Add grand_total computation in wallet-holdings.controllers.ts (sum of all total_value entries, returned as string)
  • Add fan-portfolio.integration.test.ts: 15 mock-based tests asserting all three held creators present with correct key_count/total_value, unhe ld creator absent, and grand_total sums correctly

#602 — Add structured warn log when indexer falls behind by > 50 ledgers

  • Raise gap threshold in ledger-gap-detection.service.ts from 10 to 50
  • Replace legacy log fields with the four required fields: latest_processed_ledger, latest_network_ledger, gap, detected_at
  • Add ledger-lag-warning.unit.test.ts: 13 mock-based tests verifying warn emitted when gap > 50, not emitted at ≤ 50, all four fields present, and warn fires on every tick while gap persists

Misc: update .gitignore with editor/OS/log/temp patterns and test snapshots

Summary

Testing

  • pnpm lint
  • pnpm build
  • pnpm exec prisma generate when schema or generated types changed

Checklist

…yerorg#601, accesslayerorg#602

accesslayerorg#600 — Add maskSensitive helper for structured log calls
- Add src/utils/mask-sensitive.utils.ts: maskSensitive(obj) recursively
  redacts url, callback, address, webhook_url, recipient keys to [REDACTED]
- Add unit tests (mask-sensitive.utils.test.ts): 30 cases covering all
  sensitive key names, non-sensitive keys unchanged, nested recursion,
  array elements, immutability, case-insensitivity
- Apply maskSensitive to the structured log call in
  wallet-activity.controllers.ts

accesslayerorg#599 — Add integration test for trade history date range filter
- Extend WalletActivityQuerySchema with optional from/to ISO datetime params
- Update fetchWalletActivity to build Prisma createdAt.gte / .lte filter
  when from / to are supplied
- Add wallet-activity-date-filter.integration.test.ts: 11 mock-based tests
  covering inside/before/after range, boundary inclusivity, Prisma where
  clause shape, and empty-range result

accesslayerorg#601 — Add integration test for fan portfolio aggregating holdings
- Add grand_total computation in wallet-holdings.controllers.ts (sum of
  all total_value entries, returned as string)
- Add fan-portfolio.integration.test.ts: 15 mock-based tests asserting
  all three held creators present with correct key_count/total_value,
  unhe ld creator absent, and grand_total sums correctly

accesslayerorg#602 — Add structured warn log when indexer falls behind by > 50 ledgers
- Raise gap threshold in ledger-gap-detection.service.ts from 10 to 50
- Replace legacy log fields with the four required fields:
  latest_processed_ledger, latest_network_ledger, gap, detected_at
- Add ledger-lag-warning.unit.test.ts: 13 mock-based tests verifying warn
  emitted when gap > 50, not emitted at ≤ 50, all four fields present,
  and warn fires on every tick while gap persists

Misc: update .gitignore with editor/OS/log/temp patterns and test snapshots
@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@Chuks-coderr 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment