Update auto-generated bindings
[ldk-java] / ts / structs / Watch.ts
index 5026f0b3c24bd5aa5ddeb666ac30ba170047fd90..300d856ee11c0980b0da3250603b6ab69bde15ff 100644 (file)
@@ -38,7 +38,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                                                        const monitor_hu_conv: ChannelMonitor = new ChannelMonitor(null, monitor);
                                monitor_hu_conv.ptrs_to.add(this);
                                                        Result_NoneChannelMonitorUpdateErrZ ret = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
-                               result: number = ret != null ? ret.ptr : 0;
+                               result: number = ret == null ? 0 : ret.clone_ptr();
                                return result;
                                                },
 
@@ -48,13 +48,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                                                        const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update);
                                update_hu_conv.ptrs_to.add(this);
                                                        Result_NoneChannelMonitorUpdateErrZ ret = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
-                               result: number = ret != null ? ret.ptr : 0;
+                               result: number = ret == null ? 0 : ret.clone_ptr();
                                return result;
                                                },
 
                                                release_pending_monitor_events (): number[] {
                                                        MonitorEvent[] ret = arg.release_pending_monitor_events();
-                               result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_14 -> ret_conv_14.ptr).toArray(number[]::new) : null;
+                               result: number[] = ret != null ? Arrays.stream(ret).map(ret_conv_14 -> ret_conv_14 == null ? 0 : ret_conv_14.clone_ptr()).toArray(number[]::new) : null;
                                return result;
                                                },