Skip to content

fix: Emit MilestoneRejected event in reject_milestone()#10

Merged
0xdevcollins merged 3 commits intomainfrom
fix/milestone-rejected-event
Apr 4, 2026
Merged

fix: Emit MilestoneRejected event in reject_milestone()#10
0xdevcollins merged 3 commits intomainfrom
fix/milestone-rejected-event

Conversation

@0xdevcollins
Copy link
Copy Markdown
Contributor

Summary

  • reject_milestone() changed milestone status to Rejected but emitted no event, making rejections invisible to the backend indexer
  • Adds MilestoneRejected event struct with campaign_id and milestone_id fields, matching the existing MilestoneApproved pattern
  • Emits the event after status update in reject_milestone()

Closes #5

Test plan

  • test_reject_milestone — existing test covers the rejection flow, now with event emission
  • All 13 unit tests pass
  • Build compiles clean

🤖 Generated with Claude Code

reject_milestone() updated status but emitted no event, making it
invisible to the backend indexer. Adds MilestoneRejected event with
campaign_id and milestone_id, matching the pattern of MilestoneApproved.

Closes #5

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

Warning

Rate limit exceeded

@0xdevcollins has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 42 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 13 minutes and 42 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8e9bb99e-d5a4-47fc-84af-57ca674ab6cc

📥 Commits

Reviewing files that changed from the base of the PR and between 8e4abed and b9c7491.

📒 Files selected for processing (2)
  • contracts/crowdfund_registry/src/contract.rs
  • contracts/crowdfund_registry/src/events/mod.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/milestone-rejected-event

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 and usage tips.

0xdevcollins and others added 2 commits April 4, 2026 08:06
…gnVoteRejected

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@0xdevcollins 0xdevcollins merged commit 82c57f5 into main Apr 4, 2026
1 check 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.

Emit MilestoneRejected event in reject_milestone

1 participant