json_to_psbt: fix API to match other allocating json_to functions.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-01-06 16:11:19 +10:30
committed by Christian Decker
parent 70410b8ee8
commit 2b6cdfeb5a
4 changed files with 13 additions and 14 deletions

View File

@@ -140,11 +140,10 @@ bool json_to_preimage(const char *buffer, const jsmntok_t *tok, struct preimage
return hex_decode(buffer + tok->start, hexlen, preimage->r, sizeof(preimage->r));
}
bool json_to_psbt(const tal_t *ctx, const char *buffer,
const jsmntok_t *tok, struct wally_psbt **dest)
struct wally_psbt *json_to_psbt(const tal_t *ctx, const char *buffer,
const jsmntok_t *tok)
{
*dest = psbt_from_b64(ctx, buffer + tok->start, tok->end - tok->start);
return dest != NULL;
return psbt_from_b64(ctx, buffer + tok->start, tok->end - tok->start);
}
void json_add_node_id(struct json_stream *response,