Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement cancelInvoice integration tests #7

Merged
merged 7 commits into from
Jul 22, 2024

Conversation

gabrielstoica
Copy link
Collaborator

@gabrielstoica gabrielstoica commented Jul 19, 2024

There's a current blocker in integrating the integration tests for the cancelInvoice method as any stream created through the StreamManager (part of the InvoiceModule) contract will be owned by the contract itself and not by the payer.

This can cause front-end issues because we'll not be able to display streams by payers but rather by InvoiceModule.

An ongoing discussion with the Sablier team has been opened here.

EDIT: After discussing with the Sablier team, the only workaround is to add a mapping in the StreamManager so we can map the initial stream sender with the stream ID. Therefore, each call to either cancelLinearStream or cancelTranchedStream is guarded by an OnlyInitialStreamSender checker.

On the front-end side, the InvoiceModule is going to emit an InvoicePaid event each time a new stream is created which gives us the ability to map the initial stream sender with the stream ID off-chain through the MetaDock subgraph.

@gabrielstoica gabrielstoica merged commit 419999e into main Jul 22, 2024
1 check passed
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