-
Notifications
You must be signed in to change notification settings - Fork 21
Add remaining missing endpoints to Cli #95
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
base: main
Are you sure you want to change the base?
Add remaining missing endpoints to Cli #95
Conversation
|
I've assigned @jkczyz as a reviewer! |
ldk-server-cli/src/types.rs
Outdated
| /// CLI-specific wrapper for ListForwardedPaymentsResponse that formats the page token | ||
| /// as "token:idx" instead of a JSON object. | ||
| #[derive(Debug, Clone, Serialize)] | ||
| pub struct CliListForwardedPaymentsResponse { |
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.
Could this be DRY'ed up by adding type parameters to CliListPaymentsResponse? Likewise in the CLI code?
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.
good call, done
0ac8775 to
b43402f
Compare
ldk-server-cli/src/main.rs
Outdated
| |pt| { | ||
| client.list_forwarded_payments(ListForwardedPaymentsRequest { | ||
| page_token: pt, | ||
| }) | ||
| }, | ||
| |r| (r.forwarded_payments, r.next_page_token), |
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.
Feel free to punt on this. I feel defining an internal trait for this (implemented by each request type) would be cleaner than passing two closures. But maybe async makes it grosser?
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.
We can't really do that because all the request and response types are auto generated from the proto files. Maybe we could somehow add it to that system but I feel that is more complicated than it is worth
b43402f to
ec6d62a
Compare
We were missing
GetPaymentDetailsandListForwardedPayments