diff --git a/plugins/pay.c b/plugins/pay.c index 62831f9abcda..8d15edd5430f 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -262,7 +262,7 @@ static struct command_result *waitsendpay_expired(struct command *cmd, for (size_t i = 0; i < tal_count(pc->ps->attempts); i++) { json_object_start(data, NULL); if (pc->ps->attempts[i].route) - json_add_member(data, "route", false, "%s", + json_add_member(data, "route", true, "%s", pc->ps->attempts[i].route); json_out_add_splice(data->jout, "failure", pc->ps->attempts[i].failure); @@ -698,6 +698,9 @@ static bool maybe_exclude(struct pay_command *pc, { const jsmntok_t *scid, *dir; + if (!route) + return false; + scid = json_get_member(buf, route, "channel"); if (node_or_channel_in_routehint(pc->plugin,