X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FPaymentError.cs;h=7df158b315b68cbaa1578de66bd50fc24914d7f6;hb=8de7213fbf663ff60322896282dad51e8ab2f001;hp=1e0597a51ea12e0aefe9cb0a10d92f471ce82afc;hpb=afc50e5d491a11364849383b75a8f939df703bac;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/PaymentError.cs b/c_sharp/src/org/ldk/structs/PaymentError.cs index 1e0597a5..7df158b3 100644 --- a/c_sharp/src/org/ldk/structs/PaymentError.cs +++ b/c_sharp/src/org/ldk/structs/PaymentError.cs @@ -28,7 +28,9 @@ public class PaymentError : CommonBase { public class PaymentError_Invoice : PaymentError { public string invoice; internal PaymentError_Invoice(long ptr) : base(null, ptr) { - this.invoice = bindings.LDKPaymentError_Invoice_get_invoice(ptr); + long invoice = bindings.LDKPaymentError_Invoice_get_invoice(ptr); + string invoice_conv = InternalUtils.decodeString(invoice); + this.invoice = invoice_conv; } } /** A PaymentError of type Sending */ @@ -60,7 +62,7 @@ public class PaymentError : CommonBase { * Utility method to constructs a new Invoice-variant PaymentError */ public static PaymentError invoice(string a) { - long ret = bindings.PaymentError_invoice(a); + long ret = bindings.PaymentError_invoice(InternalUtils.encodeString(a)); GC.KeepAlive(a); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.PaymentError ret_hu_conv = org.ldk.structs.PaymentError.constr_from_ptr(ret);