paymod: Not having a result doesn't mean we failed at getroute

Specifically if we split, there is no result, but we shouldn't add a failure
message.
This commit is contained in:
Christian Decker
2020-07-03 20:55:20 +02:00
parent b813974e13
commit d0eb3a79eb
2 changed files with 17 additions and 1 deletions

View File

@@ -1512,7 +1512,9 @@ static void paystatus_add_payment(struct json_stream *s, const struct payment *p
/* TODO Add routehint. */
/* TODO Add route details */
if (p->result != NULL) {
if (p->step == PAYMENT_STEP_SPLIT) {
/* Don't add anything, this is neither a success nor a failure. */
} else if (p->result != NULL) {
if (p->step == PAYMENT_STEP_SUCCESS)
json_object_start(s, "success");
else