X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FAccess.ts;h=ccb20fb0e3272f98d17b75eceaedb08e05a67091;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=416f2a14c0a286f62c74cdd832ba9ca9d8935f11;hpb=e30b350e325e7d517ea744578876d473839ad495;p=ldk-java diff --git a/ts/structs/Access.ts b/ts/structs/Access.ts index 416f2a14..ccb20fb0 100644 --- a/ts/structs/Access.ts +++ b/ts/structs/Access.ts @@ -34,7 +34,7 @@ import * as bindings from '../bindings' // TODO: figure out location // todo: in-line interface filling get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number { Result_TxOutAccessErrorZ ret = arg.get_utxo(genesis_hash, short_channel_id); - result: number = ret != null ? ret.ptr : 0; + result: number = ret == null ? 0 : ret.clone_ptr(); return result; }, @@ -53,7 +53,7 @@ import * as bindings from '../bindings' // TODO: figure out location held: Access; } public Result_TxOutAccessErrorZ get_utxo(Uint8Array genesis_hash, number short_channel_id) { - number ret = bindings.Access_get_utxo(this.ptr, genesis_hash, short_channel_id); + number ret = bindings.Access_get_utxo(this.ptr, InternalUtils.check_arr_len(genesis_hash, 32), short_channel_id); Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret); return ret_hu_conv; }