You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both classes issue subscribe requests when listeners to certain events are added.
I believe a average developer wouldn't expect such a behavior, and thus it should be removed.
Also creating an Account triggers this behavior, because the constructor automatically adds a 'transaction' listener. IMHO this should be removed as well.
Plus I can guarantee that this functionality is not used by anyone, because it is broken:
The text was updated successfully, but these errors were encountered:
emoitzi
changed the title
Adding an event listener to Account and Remote shouldn't trigger SubscribeRequest (broken anyway)
Adding a event listener to Account and Remote shouldn't trigger SubscribeRequest (broken anyway)
Mar 5, 2015
Both classes issue subscribe requests when listeners to certain events are added. I believe a average developer wouldn't expect such a behavior, and thus it should be removed.
I kind of agree. It's been discussed before but we didn't have compelling reason to change. Thanks for your input on the API. To be clear, you're suggesting a separate .subscribe() method and getting rid of automatic subscription/unsubscription via added/removed event listeners, right?
Plus I can guarantee that this functionality is not used by anyone, because it is broken:
wltsmrz
changed the title
Adding a event listener to Account and Remote shouldn't trigger SubscribeRequest (broken anyway)
Adding a event listener to Account and Remote shouldn't trigger automatic subscription
Mar 5, 2015
To be clear, you're suggesting a separate .subscribe() method and getting rid of automatic subscription/unsubscription via added/removed event listeners, right?
Right.
I can guarantee that it is! under_score and camelCase methods work with Remote, Request, etc.,
Oh, I overlooked that piece. Looks like your guarantee supersedes mine. 😇
Both classes issue subscribe requests when listeners to certain events are added.
I believe a average developer wouldn't expect such a behavior, and thus it should be removed.
Also creating an Account triggers this behavior, because the constructor automatically adds a 'transaction' listener. IMHO this should be removed as well.
Plus I can guarantee that this functionality is not used by anyone, because it is broken:
https://github.com/ripple/ripple-lib/blob/423ec7d08af997e77866052653f324b9ed1b1920/src/js/ripple/account.js#L46
request_subscribe -> requestSubscribe
https://github.com/ripple/ripple-lib/blob/98f40abfc3aa74dec5067a2d90002756cc8acd01/src/js/ripple/remote.js#L220
The text was updated successfully, but these errors were encountered: