| 882 | }; |
| 883 | |
| 884 | static struct command_result *do_edit_desc_payment(struct command *cmd, |
| 885 | struct edit_desc_payment_info *info) |
| 886 | { |
| 887 | struct json_stream *res; |
| 888 | struct channel_event **channel_events; |
| 889 | struct chain_event **chain_events; |
| 890 | struct bkpr *bkpr = bkpr_of(cmd->plugin); |
| 891 | |
| 892 | add_payment_hash_description(cmd, bkpr, info->identifier, info->new_desc); |
| 893 | |
| 894 | chain_events = get_chain_events_by_id(cmd, bkpr, cmd, info->identifier); |
| 895 | channel_events = get_channel_events_by_id(cmd, bkpr, cmd, info->identifier); |
| 896 | |
| 897 | res = jsonrpc_stream_success(cmd); |
| 898 | json_array_start(res, "updated"); |
| 899 | json_add_events(res, bkpr, channel_events, chain_events, NULL); |
| 900 | json_array_end(res); |
| 901 | |
| 902 | return command_finished(cmd, res); |
| 903 | } |
| 904 | |
| 905 | static struct command_result *json_edit_desc_payment_id(struct command *cmd, |
| 906 | const char *buf, |
nothing calls this directly
no test coverage detected