Skip to content

Feat/test coverage follow stats liquidity escrow#1257

Merged
Olowodarey merged 3 commits into
Arena1X:mainfrom
strngecloud:feat/test-coverage-follow-stats-liquidity-escrow
Jun 29, 2026
Merged

Feat/test coverage follow stats liquidity escrow#1257
Olowodarey merged 3 commits into
Arena1X:mainfrom
strngecloud:feat/test-coverage-follow-stats-liquidity-escrow

Conversation

@strngecloud

Copy link
Copy Markdown
Contributor

PR Description

Summary

This PR addresses four GitHub issues by adding comprehensive tests and a new public API endpoint for user follow statistics.

Issues Closed

Changes

Backend - Flags Service (#1159)

  • Added tests verifying that FlagsService.createFlag allows re-flagging after a flag is resolved or dismissed
  • Confirmed that the duplicate check only applies to flags with PENDING status
  • Existing test coverage for the core functionality already in place

Backend - Users Service (#1161)

  • Created new FollowStatsResponseDto for lightweight follower/following counts
  • Implemented getFollowStats method in UsersService
  • Added GET /users/:address/follow-stats public endpoint to UsersController
  • Added unit tests verifying accurate count retrieval without returning full lists

Smart Contracts - Liquidity (#1046)

  • Added test verifying that LP providers receive principal plus accumulated fees when removing liquidity
  • Test confirms pool total_pool == 0 after full removal
  • Test confirms LPPosition no longer exists after full removal
  • Fee collection happens via collect_lp_fees before removal

Smart Contracts - Escrow (#1058)

  • Added test demonstrating that assert_escrow_solvent detects underfunding
  • Test creates market with 2 users staking to ensure proper escrow state
  • Test forces insolvent state by transferring XLM out and verifies error detection
  • Test verifies restoration of balance returns to solvent state

Testing

  • ✅ All backend tests pass (583 tests)
  • ✅ All contract tests pass
  • ✅ No existing functionality broken

strngecloud and others added 3 commits June 29, 2026 11:00
Add tests to verify that FlagsService.createFlag allows creating new flags
after a previous flag has been resolved or dismissed. Confirms that duplicate
check only applies to PENDING status.

test(users): add getFollowStats endpoint and tests

Add GET /users/:address/follow-stats public endpoint returning follower and
following counts without the full lists. Includes FollowStatsResponseDto and
comprehensive unit tests.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add comprehensive test verifying that LP providers receive principal plus
accumulated fees when removing liquidity. Confirms fee collection works
correctly and pool is empty after full removal.

test(escrow): add test for assert_escrow_solvent underfunding detection

Add test verifying that assert_escrow_solvent correctly detects when contract
balance falls below outstanding obligations and can verify restoration.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add createQueryBuilder mock to UserFollow repository mock
- Update test assertions to match actual error messages
- Fix test error messages to use NotFoundException class instead of string

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview, Comment Jun 29, 2026 10:14am

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

@Olowodarey Olowodarey merged commit cffa919 into Arena1X:main Jun 29, 2026
7 checks passed
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