feat: add subscription pausing by subscriber with duration limits and…#132
Merged
Smartdevs17 merged 3 commits intoSmartdevs17:mainfrom Mar 26, 2026
Merged
Conversation
Owner
|
resolve conflicts |
… refund mechanism - Add pause_by_subscriber with configurable duration (max 30 days) - pause_subscription defaults to max pause duration - Auto-resume when pause duration expires (checked on charge/get) - Add request_refund, approve_refund, reject_refund flows - Add paused_at, pause_duration, refund_requested_amount fields to Subscription - Publish on-chain events for pause, resume, refund_requested, approved, rejected - Add comprehensive test coverage for all new functionality
bc0152c to
70277d2
Compare
added 2 commits
March 26, 2026 00:45
Integrate upstream changes (MockToken, token::Client transfer, updated test snapshots) while preserving subscription pausing with duration limits, auto-resume, and the refund mechanism.
- Regenerate package-lock.json to include cli-table3@0.6.5 from upstream - Bump RUST_VERSION from 1.77 to 1.85 to support edition2024 required by base64ct-1.8.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR closes #98
implemented a robust pausing mechanism that gives subscribers more control over their recurring payments.
Feature Implementation: Added
pause_by_subscriber
to the Soroban contract, allowing users to pause for a specific duration (up to 30 days).
Auto-Resume Logic: Updated the contract to automatically resume and charge subscriptions once the pause duration expires.
Data Structure: Enhanced the
Subscription
struct with paused_at and pause_duration fields.
Verification: Added comprehensive unit tests confirming that duration limits are enforced and auto-resume works as expected.