Skip to content

Feature: add an endpoint to extend a stream's stopTime #9

Description

@ijeoma270

Once a stream is created there's no way to make it run longer, the stop time only ever gets set at creation and the service has no path to update it. So right now if a sender wants to keep paying someone past the original end date, the only option is cancelling and starting a brand new stream, which breaks continuity and makes the recipient start tracking withdrawals all over again.

Add an endpoint to extend a stream's stop time. It should check the new stop time is actually later than the current one and later than the start time, and only allow this while the stream is still active. Follow the same pattern the existing status and withdrawn updates use, and bump updatedAt when it succeeds. Worth noting in the PR how this should eventually connect to an actual on-chain call, the contract side isn't part of this issue, this is just the API and indexer plumbing so the frontend has somewhere to call once that contract method exists.

Relevant files are stream.entity.ts and streams.service.ts.

Before submitting your PR, make sure all checks pass locally and the build succeeds. Each issue will be thoroughly reviewed and only merged if it fully meets the requirements. In your PR, specify the issue number and title, and include tests for a valid extension, trying to extend a stream that isn't active, and trying to shrink the stop time. On the issue, comment tagging the author to let them know you're working on it. On the PR, tag the maintainer to notify that review is ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions