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

Unsubscring Using Subscription ID #4007

Closed
bkr32 opened this issue Apr 24, 2021 · 4 comments · Fixed by #4061
Closed

Unsubscring Using Subscription ID #4007

bkr32 opened this issue Apr 24, 2021 · 4 comments · Fixed by #4061
Labels
1.x 1.0 related issues 3.x 3.0 related issues Feature Request Investigate P3 Low severity bugs

Comments

@bkr32
Copy link

bkr32 commented Apr 24, 2021

In the docs https://web3js.readthedocs.io/en/v1.3.4/web3-eth-subscribe.html#subscribe
a return of the subscribe function is subscribtion.id , the docs mentions as follows

subscription.id: The subscription id, used to identify and unsubscribing the subscription.

however i have been unable to find any information relating to the same.

How can subscription.id be used to unsubscribe a subscription

@spacesailor24 spacesailor24 added 1.x 1.0 related issues 3.x 3.0 related issues P3 Low severity bugs Question General discussion questions labels May 11, 2021
@spacesailor24
Copy link
Contributor

Thank you for bringing this to our attention, at first glance it does seem like subscription.id is unused, as unsubscribe exists as a method on the subscription instance. I do not have the availability to confirm this, but someone from our team might

@bkr32
Copy link
Author

bkr32 commented May 11, 2021

@spacesailor24 after hours of pondering, I came to realize that the subscription.id is only used when calling unsubscribe directly to the intended subscription, I'm not quite sure if this is a intended behavior or if subscription.id actually was intended to be called to unsubscribe a subscription ie unsubscribe(subscription.id) or similar

@GregTheGreek
Copy link
Contributor

@bkr32 Is this still an issue?

@bkr32
Copy link
Author

bkr32 commented May 11, 2021

@GregTheGreek if it is at all possible to call unsubscribe using the subscription.id it'd be great, however if this is unsubscribe's intended behaviour that's fine as well, just hope it can be clearified in the docs since i was under the impression that there's a method in which we can pass said id to unsubscribe

@spacesailor24 spacesailor24 added Feature Request and removed Question General discussion questions labels May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues 3.x 3.0 related issues Feature Request Investigate P3 Low severity bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants