X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FRoutingFees.cs;h=d296f2851d2da8ad74d4d0cad601d566cebd22b9;hb=8de7213fbf663ff60322896282dad51e8ab2f001;hp=087d9562a987f1dc41fad30ab93277bef3737178;hpb=7811d2191440c55034e1abfbf3be442d4b25481b;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/RoutingFees.cs b/c_sharp/src/org/ldk/structs/RoutingFees.cs index 087d9562..d296f285 100644 --- a/c_sharp/src/org/ldk/structs/RoutingFees.cs +++ b/c_sharp/src/org/ldk/structs/RoutingFees.cs @@ -117,16 +117,18 @@ public class RoutingFees : CommonBase { * Serialize the RoutingFees object into a byte array which can be read by RoutingFees_read */ public byte[] write() { - byte[] ret = bindings.RoutingFees_write(this.ptr); + long ret = bindings.RoutingFees_write(this.ptr); GC.KeepAlive(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; } /** * Read a RoutingFees from a byte array, created by RoutingFees_write */ public static Result_RoutingFeesDecodeErrorZ read(byte[] ser) { - long ret = bindings.RoutingFees_read(ser); + long ret = bindings.RoutingFees_read(InternalUtils.encodeUint8Array(ser)); GC.KeepAlive(ser); if (ret >= 0 && ret <= 4096) { return null; } Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);