-
Notifications
You must be signed in to change notification settings - Fork 968
Feature/xpay payment description #8784
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: master
Are you sure you want to change the base?
Changes from all commits
ca3caca
a8b00ce
d2840ab
d4ed3c9
51e5ed7
c7f34e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,7 +181,7 @@ static struct command_result *xpay_core(struct command *cmd, | |
| u32 retryfor, | ||
| const struct amount_msat *partial, | ||
| u32 maxdelay, | ||
| bool as_pay); | ||
| bool as_pay); | ||
|
|
||
| /* Wrapper for pending commands (ignores return) */ | ||
| static void was_pending(const struct command_result *res) | ||
|
|
@@ -1790,6 +1790,7 @@ struct xpay_params { | |
| unsigned int retryfor; | ||
| u32 maxdelay; | ||
| const char *bip353; | ||
| const char *payer_note; | ||
| }; | ||
|
|
||
| static struct command_result * | ||
|
|
@@ -1820,9 +1821,12 @@ do_fetchinvoice(struct command *cmd, const char *offerstr, struct xpay_params *x | |
| json_add_string(req->js, "offer", offerstr); | ||
| if (xparams->msat) | ||
| json_add_amount_msat(req->js, "amount_msat", *xparams->msat); | ||
| if (xparams->bip353) | ||
| json_add_string(req->js, "bip353", xparams->bip353); | ||
| return send_outreq(req); | ||
| if (xparams->bip353) | ||
| json_add_string(req->js, "bip353", xparams->bip353); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mismatched alignment. |
||
| if (xparams->payer_note) | ||
| json_add_string(req->js, "payer_note", xparams->payer_note); | ||
|
|
||
| return send_outreq(req); | ||
| } | ||
|
|
||
| static struct command_result * | ||
|
|
@@ -1867,7 +1871,8 @@ static struct command_result *json_xpay_params(struct command *cmd, | |
| const char *invstring; | ||
| const char **layers; | ||
| u32 *maxdelay; | ||
| unsigned int *retryfor; | ||
| const char *payer_note; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: To keep the formatting consistent and avoid tabs/spaces alignment issues (especially between editors and the GitHub UI), could we format this to match the existing tab-based style? |
||
| unsigned int *retryfor; | ||
| struct out_req *req; | ||
| struct xpay_params *xparams; | ||
|
|
||
|
|
@@ -1879,7 +1884,8 @@ static struct command_result *json_xpay_params(struct command *cmd, | |
| p_opt_def("retry_for", param_number, &retryfor, 60), | ||
| p_opt("partial_msat", param_msat, &partial), | ||
| p_opt_def("maxdelay", param_u32, &maxdelay, 2016), | ||
| NULL)) | ||
| p_opt("payer_note", param_string, &payer_note), | ||
| NULL)) | ||
| return command_param_failed(); | ||
|
|
||
| /* Is this a one-shot vibe payment? Kids these days! */ | ||
|
|
@@ -1901,6 +1907,7 @@ static struct command_result *json_xpay_params(struct command *cmd, | |
| xparams->retryfor = *retryfor; | ||
| xparams->maxdelay = *maxdelay; | ||
| xparams->bip353 = NULL; | ||
| xparams->payer_note = payer_note; | ||
|
|
||
| return do_fetchinvoice(cmd, invstring, xparams); | ||
| } | ||
|
|
@@ -1915,6 +1922,7 @@ static struct command_result *json_xpay_params(struct command *cmd, | |
| xparams->retryfor = *retryfor; | ||
| xparams->maxdelay = *maxdelay; | ||
| xparams->bip353 = invstring; | ||
| xparams->payer_note = payer_note; | ||
|
|
||
| req = jsonrpc_request_start(cmd, "fetchbip353", | ||
| bip353_fetched, | ||
|
|
||
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.
The CI is currently failing due to version mismatch in your
grpcio. Please downgrade your local grpcio (uv pip install grpcio==1.75.1).