Skip to content

Add test coverage: wallet activity ordering, price snapshot logging, address validation, pagination edges - #653

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Abidoyesimze:fix/issues-635-636-637-638
Jul 26, 2026
Merged

Add test coverage: wallet activity ordering, price snapshot logging, address validation, pagination edges#653
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Abidoyesimze:fix/issues-635-636-637-638

Conversation

@Abidoyesimze

Copy link
Copy Markdown
Contributor

Summary

  • Order wallet activity feed items by ledger descending and add an integration test seeding trades at ledgers 1000/2000/3000, asserting response order, type correctness, and that the pagination limit/cursor are respected.
  • Wire the ledger number through the indexer pipeline into upsertPriceSnapshot and fix the debug-level log emitted after each successful price snapshot write to use the correct fields (creator_id, new_price, previous_price, ledger, ingested_at), with previous_price null on the first snapshot and no log on a failed write.
  • Add missing Stellar address validation test coverage for adjacent invalid formats: single lowercase character, invalid base32 character (0), leading whitespace, and trailing newline, plus a regression check on the existing valid address.
  • Add missing buildPaginatedResponse boundary tests for a limit of 1 (2 results → has_more: true; 1 result → has_more: false).

Closes #637
Closes #636
Closes #638
Closes #635

Test plan

  • npx jest src/modules/wallets/__tests__/wallet-activity-ledger-order.integration.test.ts
  • npx jest src/modules/indexer/price-snapshot-debug-log.unit.test.ts
  • npx jest src/modules/indexer/indexer-pipeline.integration.test.ts
  • npx jest src/modules/wallet/__tests__/wallet.utils.test.ts
  • npx jest src/utils/test/pagination.utils.test.ts
  • npx tsc --noEmit and npx eslint clean on all touched files

🤖 Generated with Claude Code

…g, address validation, and pagination edge cases

- Order wallet activity feed test by ledger descending and verify pagination (accesslayerorg#637)
- Emit correct debug log fields (creator_id, new_price, previous_price, ledger, ingested_at) on price snapshot writes (accesslayerorg#636)
- Cover adjacent invalid Stellar address formats: lowercase, invalid base32 char, leading/trailing whitespace (accesslayerorg#638)
- Cover buildPaginatedResponse boundary cases for limit of 1 (accesslayerorg#635)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

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

@Chucks1093
Chucks1093 merged commit fa713da into accesslayerorg:main Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment