Skip to content

fix(bounties): throw BadRequestException when releasing team bounty with empty splits - #189

Open
moxiaoshen567 wants to merge 1 commit into
MergeFi:mainfrom
moxiaoshen567:fix-empty-team-splits-paid-transition
Open

fix(bounties): throw BadRequestException when releasing team bounty with empty splits#189
moxiaoshen567 wants to merge 1 commit into
MergeFi:mainfrom
moxiaoshen567:fix-empty-team-splits-paid-transition

Conversation

@moxiaoshen567

Copy link
Copy Markdown

Fixes #102

Summary

  • In BountiesService.markMergedAndRelease, throw BadRequestException when an assigned team has zero member splits (!team || !team.splits || team.splits.length === 0) instead of silently skipping splitRelease and erroneously transitioning the bounty status to PAID.
  • Added unit tests in src/bounties/bounties.service.spec.ts asserting:
    1. markMergedAndRelease throws BadRequestException and prevents escrow release / transition to PAID when team.splits is empty.
    2. markMergedAndRelease performs split release as expected when valid splits exist.

Verification

npx jest src/bounties/bounties.service.spec.ts
# 8 passed, 8 total (100%)
npx jest src/teams/ src/escrow/ src/github/
# 85 passed, 85 total across 10 test suites

/claim #102

💰 Payout Details

  • USDC (Solana): 6UvBhyhY6ayeoJEGZxK4bDoFAHd9yeRDTVusnoDGdgQ5
  • USDT (TRON / TRC20): TYcNrMSoY36q8WrsFSZyB26Rkj25EFgQsX

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@moxiaoshen567 is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@moxiaoshen567

Copy link
Copy Markdown
Author

💰 Payout Details

  • USDC (Solana): 6UvBhyhY6ayeoJEGZxK4bDoFAHd9yeRDTVusnoDGdgQ5
  • USDT (TRON / TRC20): TYcNrMSoY36q8WrsFSZyB26Rkj25EFgQsX

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BountiesService.markMergedAndRelease marks a team-assigned bounty PAID even when team.splits is empty, skipping the payout entirely

1 participant