- long ret = bindings.PaymentPurpose_invoice_payment(payment_preimage, payment_secret, user_payment_id);
- if (ret >= 0 && ret < 1024) { return null; }
+ long ret = bindings.PaymentPurpose_invoice_payment(InternalUtils.check_arr_len(payment_preimage, 32), InternalUtils.check_arr_len(payment_secret, 32), user_payment_id);
+ if (ret >= 0 && ret <= 4096) { return null; }