mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-30 03:04:21 +01:00
plugin: Adding status to the pay plugin
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Rebase Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
62ef403d20
commit
9d5c992fc8
@@ -1894,7 +1894,7 @@ static struct command_result *json_listpays(struct command *cmd,
|
||||
const char *buf,
|
||||
const jsmntok_t *params)
|
||||
{
|
||||
const char *invstring;
|
||||
const char *invstring, *status_str;
|
||||
struct sha256 *payment_hash;
|
||||
struct out_req *req;
|
||||
|
||||
@@ -1903,6 +1903,7 @@ static struct command_result *json_listpays(struct command *cmd,
|
||||
/* FIXME: parameter should be invstring now */
|
||||
p_opt("bolt11", param_string, &invstring),
|
||||
p_opt("payment_hash", param_sha256, &payment_hash),
|
||||
p_opt("status", param_string, &status_str),
|
||||
NULL))
|
||||
return command_param_failed();
|
||||
|
||||
@@ -1915,6 +1916,8 @@ static struct command_result *json_listpays(struct command *cmd,
|
||||
if (payment_hash)
|
||||
json_add_sha256(req->js, "payment_hash", payment_hash);
|
||||
|
||||
if (status_str)
|
||||
json_add_string(req->js, "status", status_str);
|
||||
return send_outreq(cmd->plugin, req);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user