From 250c763c76163e3a6d3ee950f856f4239d73fce0 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 20 Feb 2017 23:58:17 -0800 Subject: [PATCH] cmd/lncli: display payment preimage in hex in sendpayment resp --- cmd/lncli/commands.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index 4ef4237c..bcd39840 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -680,7 +680,13 @@ func sendPaymentCommand(ctx *cli.Context) error { paymentStream.CloseSend() - printRespJson(resp) + printJson(struct { + P string `json:"payment_preimage"` + R *lnrpc.Route `json:"payment_route"` + }{ + P: hex.EncodeToString(resp.PaymentPreimage), + R: resp.PaymentRoute, + }) return nil }