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

cln-rpc: Make description field of Wait(any)invoiceResponse optional string #7660

Conversation

laanwj
Copy link
Contributor

@laanwj laanwj commented Sep 12, 2024

cln-rpc: Make description field of Wait(any)invoiceResponse optional string

Description

In case of a bolt12 invoice, the description field is missing in waitinvoice and waitanyinvoice responses. Make it optional in the rust struct.

Related Issues

N/A afaik

Changes Made

  • Bug Fix: Make description field of WaitanyinvoiceResponse an optional string.

Checklist

Ensure the following tasks are completed before submitting the PR:

  • Changelog has been added in relevant commit/s.
  • Tests have been added or updated to cover the changes: i don't know where to add it, there doesn't seem an existing test for this
  • Documentation has been updated as needed: i don't think there is documentation for this struct
  • Any relevant comments or TODOs have been addressed or removed.

Review note

Might want to be sure that this is the only response where this is needed? It looks like most invoice response structs have optional description, but not all:

  • CreateinvoiceResponse
  • SendinvoiceResponse

I don't think these have a possible BOLT12 path but not sure.

Also this is API breaking-I don't know how versioning is handled in the crate.

In case of a bolt12 invoice, the description field is missing in `waitinvoice` and `waitanyinvoice`
responses. Make it optional in the rust struct.

Changelog-Fixed: cln-rpc: Make description in `Wait(any)invoiceResponse` optional to handle BOLT12
@laanwj
Copy link
Contributor Author

laanwj commented Sep 12, 2024

Looks like the grpc mapping needs an analogous change.

@daywalker90
Copy link
Contributor

These are auto-generated files you edited. The correct fix would be to fix the json schemas. I gave both waitinvoice and waitanyinvoice a quick look and they both require a description in the response. This was fine for bolt11 since invoice required a description. offer does not require a description so waitinvoice and waitanyinvoice schemas should remove description from it's required section.

@laanwj
Copy link
Contributor Author

laanwj commented Sep 13, 2024

Ok, thanks, closing.

@laanwj laanwj closed this Sep 13, 2024
@laanwj laanwj deleted the 2024-09-waitanyinvoice-description-option branch September 13, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants