Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented May 12, 2025

Ensure Subscription Balance > Minimum Balance After Adding Funds

This PR adds a check in the addFunds function to ensure that the subscription balance is greater than the minimum balance after funds are added. This ensures that active subscriptions always maintain the required minimum balance.

Changes

  • Added a check in addFunds to ensure that active subscriptions maintain minimum balance after funds are added
  • Added tests in PulseScheduler.t.sol to verify this behavior for both regular and permanent subscriptions

Testing

  • Added test testAddFundsEnforcesMinimumBalance to verify minimum balance check for regular subscriptions
  • Added test testAddFundsEnforcesMinimumBalanceForPermanentSubscription to verify minimum balance check for permanent subscriptions
  • All tests pass successfully

Link to Devin run: https://app.devin.ai/sessions/6a8af4d12771419d86aff4d8c2663944
Requested by: Tejas Badadare ([email protected])

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@tejasbadadare tejasbadadare changed the title fix: ensure subscription balance is greater than minimum balance after adding funds fix(pulse): ensure subscription balance is greater than minimum balance after adding funds May 12, 2025
@vercel
Copy link

vercel bot commented May 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 7:17pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 7:17pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 7:17pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 7:17pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 7:17pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 7:17pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 7:17pm

@tejasbadadare tejasbadadare changed the base branch from main to devin/1747072255-add-max-deposit-limit-for-permanent-subscriptions May 12, 2025 19:05
Co-Authored-By: Tejas Badadare <[email protected]>
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.

1 participant