mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-09 17:14:28 +01:00
plugins: listpays ignores pre-0.7.0 or manual sendpay payments w/ no bolt11.
The pay plugin has been supplying the bolt11 string since 0.7.0, so only ancient "pay" commands would be omitted by this change. You can create a no-bolt11 "sendpay" manually, but then you'll find it in 'listsendpays'. Changelog-Removed: JSON: `listpays` won't shown payments made via sendpay without a bolt11 string, or before 0.7.0. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
8e3234e67a
commit
f1bc0b21f1
@@ -1300,18 +1300,10 @@ static struct command_result *listsendpays_done(struct command *cmd,
|
||||
const jsmntok_t *status, *b11;
|
||||
|
||||
json_out_start(ret, NULL, '{');
|
||||
/* Old payments didn't have bolt11 field */
|
||||
b11 = copy_member(ret, buf, t, "bolt11");
|
||||
if (!b11) {
|
||||
if (b11str) {
|
||||
/* If it's a single query, we can fake it */
|
||||
json_out_addstr(ret, "bolt11", b11str);
|
||||
} else {
|
||||
copy_member(ret, buf, t, "payment_hash");
|
||||
copy_member(ret, buf, t, "destination");
|
||||
copy_member(ret, buf, t, "amount_msat");
|
||||
}
|
||||
}
|
||||
/* Old (or manual) payments didn't have bolt11 field */
|
||||
if (!b11)
|
||||
continue;
|
||||
|
||||
/* listsendpays might say it failed, but we're still retrying */
|
||||
status = json_get_member(buf, t, "status");
|
||||
|
||||
Reference in New Issue
Block a user