-
Notifications
You must be signed in to change notification settings - Fork 42
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: replace waitForRemotePeers()
with waku.waitForPeer()
method
#2161
Conversation
…ise, decouple from protocol implementations
…f peer renewal mechanism
size-limit report 📦
|
packages/interfaces/src/waku.ts
Outdated
* waku.isConnected() === true; | ||
* ``` | ||
*/ | ||
connect(protocols?: Protocols[], timeoutMs?: number): Promise<void>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waku-org/js-waku looking for your feedback on naming
named it connect
as when it is used it looks like await waku.connect();
which seems convenient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed to use .waitForPeer
instead
@danisharora099 ping for your input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waitForConnectivity
perhaps would be more verbose. Indifferent from now, we can improve this with external feedback
waitForRemotePeers()
with waku.connect()
methodwaitForRemotePeers()
with waku.waitForPeer()
method
waitForRemotePeers()
with waku.waitForPeer()
methodwaitForRemotePeers()
with waku.waitForPeer()
method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented nits, lgtm
* feat: add mocha tests to @waku/sdk and cover waitForRemotePeer * add waitForRemote UTs * remove junk
* chore: expose peerId and protocols from WakuNode * remove unused method * move to private method
Problem
We have a common pattern when users absolutely need to:
This PR makes
IWaku
self sufficient:Other stuff
waitForRemotePeers
;Waku
interface toIWaku
;Notes
waitForRemotePeer
part of thewaku
interface #1761