ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.81k stars 889 forks source link

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

Closed laanwj closed 1 week ago

laanwj commented 1 week ago

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

Checklist

Ensure the following tasks are completed before submitting the PR:

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:

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.

laanwj commented 1 week ago

Looks like the grpc mapping needs an analogous change.

daywalker90 commented 1 week ago

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 commented 1 week ago

Ok, thanks, closing.