From 2060ddb887b3d1a01213be3f32d98453206aeef9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Dec 2024 09:16:33 +1030 Subject: [PATCH] xpay: simplify printing of destination. Signed-off-by: Rusty Russell --- plugins/xpay/xpay.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/xpay/xpay.c b/plugins/xpay/xpay.c index c37be71ee721..2090f3bb52b9 100644 --- a/plugins/xpay/xpay.c +++ b/plugins/xpay/xpay.c @@ -374,7 +374,6 @@ 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) { @@ -385,8 +384,7 @@ 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_pubkey(js, "destination", &payment->destination); 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);