| 1079 | } |
| 1080 | |
| 1081 | static struct command_result *signpsbt_get_result(struct command *cmd, |
| 1082 | const char *methodname, |
| 1083 | const char *buf, |
| 1084 | const jsmntok_t *result, |
| 1085 | struct splice_cmd *splice_cmd) |
| 1086 | { |
| 1087 | const jsmntok_t *tok = json_get_member(buf, result, "signed_psbt"); |
| 1088 | struct channel_id *channel_ids; |
| 1089 | |
| 1090 | tal_free(splice_cmd->psbt); |
| 1091 | |
| 1092 | splice_cmd->psbt = json_to_psbt(splice_cmd, buf, tok); |
| 1093 | splice_cmd->wallet_inputs_to_signed = 0; |
| 1094 | |
| 1095 | /* After signing we add channel_ids to the PSBT for splice_signed */ |
| 1096 | channel_ids = tal_arr(NULL, struct channel_id, 0); |
| 1097 | for (size_t i = 0; i < tal_count(splice_cmd->actions); i++) |
| 1098 | if (splice_cmd->actions[i]->channel_id) |
| 1099 | tal_arr_expand(&channel_ids, |
| 1100 | *splice_cmd->actions[i]->channel_id); |
| 1101 | |
| 1102 | psbt_set_channel_ids(splice_cmd->psbt, channel_ids); |
| 1103 | tal_free(channel_ids); |
| 1104 | |
| 1105 | return continue_splice(splice_cmd->cmd, splice_cmd); |
| 1106 | } |
| 1107 | |
| 1108 | static struct command_result *signpsbt(struct command *cmd, |
| 1109 | struct splice_cmd *splice_cmd) |
nothing calls this directly
no test coverage detected