Skip to content

Allow stream senders to cancel/renounce through a Stream Management contract #977

Closed Answered by gabrielstoica
gabrielstoica asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @andreivladbrg, @smol-ninja!

I've found a workaround for this that solves the "problem".

In the StreamManager contract I've added a mapping called _initialStreamSender defined as follows:

mapping(uint256 streamId => address initialSender) private _initialStreamSender;

When a new stream gets created, the sender will be the InvoiceManager and the _initialStreamSender[streamId] will be set to msg.sender which is the payer of the invoice. This will guard the cancel method call and allow only the right user to cancel a stream.

On the front-end side, there is an event that logs the payment of an invoice together with the initial stream sender so we can display all invoices (+ their streams) …

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@andreivladbrg
Comment options

@gabrielstoica
Comment options

@smol-ninja
Comment options

@gabrielstoica
Comment options

Comment options

You must be logged in to vote
3 replies
@smol-ninja
Comment options

@PaulRBerg
Comment options

@gabrielstoica
Comment options

Answer selected by smol-ninja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #977 on July 18, 2024 16:24.