Skip to content

Commit

Permalink
xpay: add destination to output
Browse files Browse the repository at this point in the history
Changelog-Add: xpay: add destination to xpay success output when xpay-handle-pay is active.

Signed-off-by: Lagrang3 <[email protected]>
  • Loading branch information
Lagrang3 authored and rustyrussell committed Dec 17, 2024
1 parent 84f30b1 commit d951365
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/xpay/xpay.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ static void payment_succeeded(struct payment *payment,
const struct attempt *attempt)
{
struct json_stream *js;
struct node_id dst;

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

0 comments on commit d951365

Please sign in to comment.