mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
plugins/pay: always include bolt11 (and description) in listpays.
We were setting it on the root, but that doesn't get handed to sendpay. Our schema doesn't *require* bolt11, either, so this was missed (there could be a *bolt12* instead). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: JSON-RPC: `listpays` always includes `bolt11` or `bolt12` field.
This commit is contained in:
@@ -480,6 +480,13 @@ static struct command_result *listsendpays_done(struct command *cmd,
|
||||
// First time we see the groupid we add it to the order
|
||||
// array, so we can retrieve them in the correct order.
|
||||
tal_arr_expand(&order, pm->sortkey);
|
||||
} else {
|
||||
/* Not all payments have bolt11/bolt12 or
|
||||
* description, as an optimization */
|
||||
if (!pm->invstring)
|
||||
pm->invstring = tal_steal(pm, invstr);
|
||||
if (!pm->description)
|
||||
pm->description = json_get_member(buf, t, "description");
|
||||
}
|
||||
|
||||
status = json_get_member(buf, t, "status");
|
||||
|
||||
Reference in New Issue
Block a user