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

feat: remove filter.subscribe() dependency on IReceiver #1979

Closed
danisharora099 opened this issue Apr 25, 2024 · 2 comments · Fixed by #2092
Closed

feat: remove filter.subscribe() dependency on IReceiver #1979

danisharora099 opened this issue Apr 25, 2024 · 2 comments · Fixed by #2092
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@danisharora099
Copy link
Collaborator

Problem

IReceiver currently expects subscribe() to be a function on the class implementation that we previously used for Filter. We moved to createSubscription() method instead, which is more generic.

Proposed Solutions

Remove the dependency which should allow us to remove the subscribe() implementation from Filter, and can just exist in the Subscription class instead

Notes

@fryorcraken fryorcraken added this to Waku Apr 25, 2024
@weboko weboko moved this to Triage in Waku May 2, 2024
@weboko
Copy link
Collaborator

weboko commented May 2, 2024

note: it is possible to remove .subscribe but we have to keep .toSubscriptionIterator to support js-noise

https://github.com/waku-org/js-noise/blob/44d0eecbfbf13eb9c69fadd05fa4494cff31229c/src/pairing.ts#L229

@weboko weboko changed the title remove filter.subscribe() dependency on IReceiver feat: remove filter.subscribe() dependency on IReceiver May 2, 2024
@weboko weboko moved this from Triage to To Do in Waku May 2, 2024
@weboko weboko added enhancement New feature or request good first issue Good for newcomers labels May 2, 2024
@danisharora099
Copy link
Collaborator Author

note: it is possible to remove .subscribe but we have to keep .toSubscriptionIterator to support js-noise

https://github.com/waku-org/js-noise/blob/44d0eecbfbf13eb9c69fadd05fa4494cff31229c/src/pairing.ts#L229

Perfect. toSubscriptionIterator can remain part of SDK, and we can remove the subscribe() dependency from Core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants