plugin: fetchinvoice: assign the quantity to the invrequest field#6090
Merged
vincenzopalazzo merged 1 commit intoElementsProject:masterfrom Mar 20, 2023
Merged
Conversation
628df5e to
2218bcb
Compare
f82f973 to
52a59a9
Compare
rustyrussell
requested changes
Mar 15, 2023
52a59a9 to
78cb683
Compare
Contributor
|
Needs: "Changelog-EXPERIMENTAL: Note: we should never rely on references to GH issues being persistent. One day GH will fail us, but we may be bisecting a problem or trying to understand some code, and we'll need the complete record in the git history! Also, it's best to include the error message (if any) in the commit message: this helps people search for the problem! |
78cb683 to
23daecb
Compare
Collaborator
Author
|
All done @rustyrussell thanks! I think we had all the information to have a description of the problem inside the commit body, thanks to suggest it! |
While the user trying to fetch an invoice by specifing the quantity we do
not work as expected.
Running the command
```
lightning-cli fetchinvoice -k offer='lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqffqszsk2p6hycmgv9ek2grpyphxjcm9ypmkjer8v46pyzmhd9jxwet5wvhxxmmdzsqs593pq0ylsvakdua5h976f4g3eautgjt3udvtyga47eaw7339sjrhpwpwz' quantity=2
```
and we answer back with
```json
{
"code": -32602,
"message": "quantity parameter required"
}
```
This is caused because we forget to bind the `quanity` field from the
RPC into the `invrequest`.
Reported-by: @aaronbarnardsound
Link: ElementsProject#6089
Signed-off-by: Vincenzo Palazzo <[email protected]>
Changelog-EXPERIMENTAL: fetchinvoice: fix: do not ignore the `quantity` field
into the invreq field.
23daecb to
acf71ae
Compare
rustyrussell
approved these changes
Mar 20, 2023
Contributor
|
Ack acf71ae |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
assign the quantity field to receive as RPC parameter inside the invrequest field.
Fixes #6089