X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FPersist.ts;h=3a4b734464a46d891b2d8405aaceb34a308dadb3;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=f13f9b90c4329ced144002a83890f8d30ae5df36;hpb=e30b350e325e7d517ea744578876d473839ad495;p=ldk-java diff --git a/ts/structs/Persist.ts b/ts/structs/Persist.ts index f13f9b90..3a4b7344 100644 --- a/ts/structs/Persist.ts +++ b/ts/structs/Persist.ts @@ -39,7 +39,7 @@ import * as bindings from '../bindings' // TODO: figure out location const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id); update_id_hu_conv.ptrs_to.add(this); Result_NoneChannelMonitorUpdateErrZ ret = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv); - result: number = ret != null ? ret.ptr : 0; + result: number = ret == null ? 0 : ret.clone_ptr(); return result; }, @@ -51,7 +51,7 @@ import * as bindings from '../bindings' // TODO: figure out location const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id); update_id_hu_conv.ptrs_to.add(this); Result_NoneChannelMonitorUpdateErrZ ret = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv); - result: number = ret != null ? ret.ptr : 0; + result: number = ret == null ? 0 : ret.clone_ptr(); return result; },