Skip to content

fix: resolve issues #197, #221, #523, #524#567

Merged
Jayy4rl merged 2 commits into
StellarYield:mainfrom
devJaja:fix/issues-197-221-523-524
May 30, 2026
Merged

fix: resolve issues #197, #221, #523, #524#567
Jayy4rl merged 2 commits into
StellarYield:mainfrom
devJaja:fix/issues-197-221-523-524

Conversation

@devJaja
Copy link
Copy Markdown
Contributor

@devJaja devJaja commented May 29, 2026

Summary

Closes #523
Closes #524
Closes #221
Closes #197

#523 — E2E test for deposit indexing flow

  • Added docker-compose.test.yml for test DB
  • Added src/deposit-indexing.e2e.test.ts covering the full pipeline: synthetic deposit event → processEventuser_vault_positionsGET /api/v1/users/:address/portfolio
  • Fixed off-by-one in stellarAddressSchema regex ({54}{55}) that made all 56-char addresses fail validation

#524 — Security headers via helmet

  • Installed helmet@8.0.0
  • Applied helmet() in app.ts before all routes
  • Added src/app.test.ts asserting X-Content-Type-Options: nosniff and X-Frame-Options on GET /health
  • Fixed pre-existing lint errors in vaults.ts (unused caught errors)

#221 — Test emergency_withdraw not affecting yield snapshots

  • Added test_emergency_withdraw_does_not_corrupt_yield_snapshots in test_escrow.rs: two users deposit, yield distributed, emergency_withdraw executed, asserts pending_yield is unchanged for both users

#197 — Test share transfer during active epoch

  • Added test_transfer_mid_epoch_yield_split in test_token.rs: mid-epoch transfer, yield distributed, yield split matches pre-transfer snapshots
  • Added test_transfer_mid_epoch_snapshot_written_once: second transfer in same epoch does not overwrite first snapshot

Test results

  • Backend: 64/64 tests pass, build clean
  • Rust: 388/388 tests pass, clippy clean, fmt clean

devJaja added 2 commits May 29, 2026 13:31
, StellarYield#524

- Add docker-compose.test.yml for test DB
- Add deposit-indexing.e2e.test.ts covering full pipeline:
  synthetic event → processEvent → user_vault_positions → portfolio API
- Fix stellarAddressSchema regex off-by-one ({54} → {55}) so 56-char
  addresses pass validation

- Install helmet@8.0.0
- Apply helmet() middleware in app.ts before routes
- Add app.test.ts verifying X-Content-Type-Options and X-Frame-Options
- Fix pre-existing lint errors in vaults.ts (unused caught errors)

- Add test_emergency_withdraw_does_not_corrupt_yield_snapshots in
  test_escrow.rs: deposits, yield distribution, emergency_withdraw,
  then asserts pending_yield is unchanged for remaining users

- Add test_transfer_mid_epoch_yield_split in test_token.rs: mid-epoch
  transfer, yield distribution, verify yield split matches snapshots
- Add test_transfer_mid_epoch_snapshot_written_once: second transfer
  in same epoch does not overwrite the first snapshot
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

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

@Jayy4rl Jayy4rl merged commit 6fb4ffd into StellarYield:main May 30, 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

2 participants