| 849 | } |
| 850 | |
| 851 | struct wally_tx *psbt_final_tx(const tal_t *ctx, const struct wally_psbt *psbt) |
| 852 | { |
| 853 | struct wally_tx *wtx; |
| 854 | |
| 855 | if (!psbt_is_finalized(psbt)) |
| 856 | return NULL; |
| 857 | |
| 858 | tal_wally_start(); |
| 859 | if (wally_psbt_extract(psbt, /* flags */ 0, &wtx) == WALLY_OK) |
| 860 | tal_add_destructor(wtx, wally_tx_destroy); |
| 861 | else |
| 862 | wtx = NULL; |
| 863 | |
| 864 | tal_wally_end_onto(ctx, wtx, struct wally_tx); |
| 865 | return wtx; |
| 866 | } |
| 867 | |
| 868 | struct wally_psbt *psbt_from_b64(const tal_t *ctx, |
| 869 | const char *b64, |
no test coverage detected