Skip to content

#776 feat(campaign: Time limited stretch goals - unlock bonuses if goal reached early FIXED - #832

Merged
Idrhas merged 2 commits into
Fundable-Protocol:mainfrom
veloura-dev:#776-feat-campaign--Time-limited-stretch-goals--unlock-bonuses-if-goal-reached-early-FIX
Sep 6, 2026
Merged

#776 feat(campaign: Time limited stretch goals - unlock bonuses if goal reached early FIXED#832
Idrhas merged 2 commits into
Fundable-Protocol:mainfrom
veloura-dev:#776-feat-campaign--Time-limited-stretch-goals--unlock-bonuses-if-goal-reached-early-FIX

Conversation

@veloura-dev

Copy link
Copy Markdown
Contributor

CLOSE #776

Findings

  • The repo is a Stellar/Fundable campaign client (stellar_client_os). Campaigns already have a main goal, milestones (25/50/75/100%), and a wizard, but no stretch goals and no time-limited bonuses.
  • CampaignRecord had no field for extra goals or timed rewards.
  • There was no API/service to unlock special backer rewards when the main goal is hit inside a window (e.g. 24 hours).
  • The issue: Allow campaign creators to set stretch goals with time limits (e.g., 24-hour bonuses). If main goal reached within timeframe, unlock special rewards for backers.

Fix features

  1. Stretch goals on campaignsstretchGoals on CampaignRecord.
  2. Creator-only setup — only the campaign creator can add stretch goals.
  3. Time window — default 24 hours; custom durationMs or windowStartsAt / windowEndsAt.
  4. Unlock rule — main goal met (raisedAmount >= goalAmount) and current time in [start, end) → status unlocked; rewards exposed via getUnlockedRewardsForBackers.
  5. Optional extra targettargetAmount on top of the main goal.
  6. Expiry — window ends without meeting the goal → expired; already-unlocked goals stay unlocked.
  7. Contribution pathapplyContributionAndUnlockStretchGoals raises funds and evaluates stretch goals in one step.
  8. WizardStretchGoalItem plus addStretchGoal / removeStretchGoal on the campaign wizard.

Validation

  • 10/10 unit tests in campaign-stretch-goals.service.test.ts passed (window math, unlock, expire, auth, validation, 24h default).

@drips-wave

drips-wave Bot commented Sep 4, 2026

Copy link
Copy Markdown

@veloura-dev 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

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 84f134b6-76f9-4f0c-b270-16ccecc955f3


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…mited-stretch-goals--unlock-bonuses-if-goal-reached-early-FIX
@Idrhas
Idrhas merged commit 317c15e into Fundable-Protocol:main Sep 6, 2026
2 of 3 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

Development

Successfully merging this pull request may close these issues.

feat(campaign): Time-limited stretch goals - unlock bonuses if goal reached early

2 participants