We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7829f2e commit f447e39Copy full SHA for f447e39
plugins/offers_inv_hook.c
@@ -28,12 +28,15 @@ fail_inv_level(struct command *cmd,
28
struct tlv_invoice_error *err;
29
u8 *errdata;
30
31
- full_fmt = tal_fmt(tmpctx, "Failed invoice %s",
32
- invoice_encode(tmpctx, inv->inv));
33
- if (inv->inv->offer_id)
34
- tal_append_fmt(&full_fmt, " for offer %s",
35
- type_to_string(tmpctx, struct sha256,
36
- inv->inv->offer_id));
+ full_fmt = tal_fmt(tmpctx, "Failed invoice");
+ if (inv->inv) {
+ tal_append_fmt(&full_fmt, " %s",
+ invoice_encode(tmpctx, inv->inv));
+ if (inv->inv->offer_id)
+ tal_append_fmt(&full_fmt, " for offer %s",
37
+ type_to_string(tmpctx, struct sha256,
38
+ inv->inv->offer_id));
39
+ }
40
tal_append_fmt(&full_fmt, ": %s", fmt);
41
42
msg = tal_vfmt(tmpctx, full_fmt, ap);
plugins/offers_invreq_hook.c
@@ -38,12 +38,15 @@ fail_invreq_level(struct command *cmd,
- full_fmt = tal_fmt(tmpctx, "Failed invoice_request %s",
- invrequest_encode(tmpctx, invreq->invreq));
43
- if (invreq->invreq->offer_id)
44
45
46
- invreq->invreq->offer_id));
+ full_fmt = tal_fmt(tmpctx, "Failed invoice_request");
+ if (invreq->invreq) {
+ invrequest_encode(tmpctx, invreq->invreq));
+ if (invreq->invreq->offer_id)
47
48
+ invreq->invreq->offer_id));
49
50
51
52
0 commit comments