Skip to content

Commit da0507c

Browse files
Lagrang3rustyrussell
authored andcommitted
xpay: add destination to output
Changelog-Add: xpay: add destination to xpay success output when xpay-handle-pay is active. Signed-off-by: Lagrang3 <[email protected]>
1 parent c893ad5 commit da0507c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/xpay/xpay.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ static void payment_succeeded(struct payment *payment,
374374
const struct attempt *attempt)
375375
{
376376
struct json_stream *js;
377+
struct node_id dst;
377378

378379
/* Only succeed once */
379380
if (payment->cmd) {
@@ -384,6 +385,8 @@ static void payment_succeeded(struct payment *payment,
384385
/* Pay's schema expects these fields */
385386
if (payment->pay_compat) {
386387
json_add_u64(js, "parts", payment->total_num_attempts);
388+
node_id_from_pubkey(&dst, &payment->destination);
389+
json_add_node_id(js, "destination", &dst);
387390
json_add_sha256(js, "payment_hash", &payment->payment_hash);
388391
json_add_string(js, "status", "complete");
389392
json_add_u64(js, "created_at", (u64)payment->start_time.ts.tv_sec);

0 commit comments

Comments
 (0)