[Contracts] Add is_active, is_paused, and is_completed helper methods on Stream struct
Overview
In contracts/stream_contract/src/types.rs and contracts/stream_contract/src/lib.rs, contract functions repeatedly match or compare stream.status == StreamStatus::Active across multiple entrypoints.
Problem
- Direct enum comparisons scattered throughout
lib.rsmake status transition checks verbose and harder to read.
Proposed Changes
- Implement
#[inline]helper methods onStreamincontracts/stream_contract/src/types.rs:pub fn is_active(&self) -> boolpub fn is_paused(&self) -> boolpub fn is_cancelled(&self) -> boolpub fn is_completed(&self) -> bool
- Replace repetitive
stream.status == ...checks inlib.rswith these helper methods.
Acceptance Criteria
- [ ] Helper methods implemented on
Streamintypes.rs. - [ ] Used consistently across
lib.rs. - [ ]
cargo testpasses with zero compiler warnings.
@innocentharuna has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
hey maintainer, please kindly assign this to me, i can surely fix it
ℹ️ Repo Maintainers: To accept this application, review their application or assign @innocentharuna to this issue.
@furqan005 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello, Furqan here. I’ve reviewed the task and am ready to begin immediately, with a focus on delivering a clean and maintainable solution.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @furqan005 to this issue.
@Alosnireda has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Kindly assign to me
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Alosnireda to this issue.
@VeronicDev has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello Maintainer, I can fix this please assign.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @VeronicDev to this issue.
@CollinsKRO has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hi Maintainer, I can fix this pls assign. ETA 5hrs
ℹ️ Repo Maintainers: To accept this application, review their application or assign @CollinsKRO to this issue.
Congratulations, @Alosnireda! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @Alosnireda: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been completed by @Alosnireda as part of the Stellar Wave Program's 10th Wave 🥳
😎 @Alosnireda: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.