X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FSpendableOutputDescriptor.ts;fp=ts%2Fstructs%2FSpendableOutputDescriptor.ts;h=005b9741b6f967c585df9e2ef3c46203ac57381d;hb=3a507eb07003be3e6714e8a87fb397c09b401ce9;hp=79a3f6ce0b53d52d582fe6750a15da23a9af4898;hpb=ceda1e3041ff42b4aadc1245f6da26fd511b51ff;p=ldk-java diff --git a/ts/structs/SpendableOutputDescriptor.ts b/ts/structs/SpendableOutputDescriptor.ts index 79a3f6ce..005b9741 100644 --- a/ts/structs/SpendableOutputDescriptor.ts +++ b/ts/structs/SpendableOutputDescriptor.ts @@ -58,7 +58,9 @@ export class DynamicOutputP2WSH extends SpendableOutputDescriptor { const key_derivation_params: number = obj.key_derivation_params; number key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params); number key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params); - TwoTuple key_derivation_params_conv = new TwoTuple(key_derivation_params_a, key_derivation_params_b); + TwoTuple key_derivation_params_conv = new TwoTuple(key_derivation_params_a, key_derivation_params_b, () -> { + bindings.C2Tuple_u64u64Z_free(key_derivation_params); + }); this.key_derivation_params = key_derivation_params_conv; this.revocation_pubkey = obj.revocation_pubkey; } @@ -79,7 +81,9 @@ export class StaticOutputCounterpartyPayment extends SpendableOutputDescriptor { const key_derivation_params: number = obj.key_derivation_params; number key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params); number key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params); - TwoTuple key_derivation_params_conv = new TwoTuple(key_derivation_params_a, key_derivation_params_b); + TwoTuple key_derivation_params_conv = new TwoTuple(key_derivation_params_a, key_derivation_params_b, () -> { + bindings.C2Tuple_u64u64Z_free(key_derivation_params); + }); this.key_derivation_params = key_derivation_params_conv; } }