diff --git a/plugins/funder.c b/plugins/funder.c index 5110a021a..478a99f9c 100644 --- a/plugins/funder.c +++ b/plugins/funder.c @@ -1055,7 +1055,7 @@ static struct command_result *json_disconnect(struct command *cmd, const char *err; err = json_scan(tmpctx, buf, params, - "{id:%}", + "{disconnect:{id:%}}", JSON_SCAN(json_to_node_id, &id)); if (err) plugin_err(cmd->plugin, diff --git a/tests/plugins/test_libplugin.c b/tests/plugins/test_libplugin.c index 53bf23bda..338437a9e 100644 --- a/tests/plugins/test_libplugin.c +++ b/tests/plugins/test_libplugin.c @@ -78,7 +78,11 @@ static struct command_result *json_connected(struct command *cmd, const char *buf, const jsmntok_t *params) { - const jsmntok_t *idtok = json_get_member(buf, params, "id"); + const jsmntok_t *connecttok, *idtok; + + connecttok = json_get_member(buf, params, "connect"); + assert(connecttok); + idtok = json_get_member(buf, connecttok, "id"); assert(idtok); plugin_log(cmd->plugin, LOG_INFORM, "%s connected", json_strdup(tmpctx, buf, idtok));