Skip to content

Add minimum funding amount before release #165

@Kingsman-99

Description

@Kingsman-99

Description

Allow creators to set a minimum funding amount (absolute value) that must be reached before an invoice can be released. If the invoice is fully paid but below the threshold, it stays pending.

Acceptance Criteria

  • InvoiceOptions accepts an optional min_funding_amount: Option<i128> field
  • _pay checks invoice.funded >= min_funding_amount before triggering auto-release
  • If threshold not met, invoice remains Pending even when funded >= total
  • A test test_min_funding_amount_delays_release verifies release is blocked below threshold
  • A test test_min_funding_amount_releases_when_met verifies release triggers when met

Context

Note: min_funding_bps (percentage-based) already exists. This is an absolute amount alternative. Auto-release logic is at the bottom of _pay in contracts/split/src/lib.rs.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignenhancementNew feature or requestgrantfoxIssue for GrantFox program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions