cmd/lncli: properly display errors when sending payments

This commit is contained in:
Olaoluwa Osuntokun 2017-07-04 15:55:26 -07:00
parent c5f4049394
commit a824a2a855
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

View File

@ -877,9 +877,11 @@ func sendPayment(ctx *cli.Context) error {
paymentStream.CloseSend()
printJSON(struct {
E string `json:"payment_error"`
P string `json:"payment_preimage"`
R *lnrpc.Route `json:"payment_route"`
}{
E: resp.PaymentError,
P: hex.EncodeToString(resp.PaymentPreimage),
R: resp.PaymentRoute,
})