-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add payment channel updated stream to ts rpc client #1803
Conversation
The implementation appears to inherit the tsdoc (it shows up in intellisense in my editor)
don't try and convert undefined to a bigint
👷 Deploy Preview for nitrodocs processing.
|
@bitwiseguy any opinion on this
|
Sorry @geoknee I think I am missing some context. What exactly are you proposing that we name |
/** | ||
* PaymentChannelUpdated attaches a callback which is triggered when the channel with supplied ID is updated. | ||
* | ||
* @param objectiveId - The id objective to wait for | ||
*/ | ||
PaymentChannelUpdated( | ||
channelId: string, | ||
callback: (info: PaymentChannelInfo) => void | ||
): 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.
Here's what I am wondering about the naming of.
Thinking about the usage, which of the following makes the most sense
nitroClient.PaymentChannelUpdated("0xabc",()=>{dothing()})
nitroClient.onPaymentChannelUpdated("0xabc",()=>{dothing()})
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.
Ok I got it. I don't have strong preference, but lean towards:
nitroClient.onPaymentChannelUpdate("0xabc",()=>{dothing()})
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.
and return cleanup fn
Closes #1770
There is very little in the way of unit or integration tests setup at present. Therefore I have filed #1806, and we should make sure to cover this event stream in that work.