MCPcopy Create free account
hub / github.com/ElementsProject/lightning / invoice_fetched

Function invoice_fetched

plugins/xpay/xpay.c:2227–2243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2225};
2226
2227static struct command_result *
2228invoice_fetched(struct command *cmd,
2229 const char *method,
2230 const char *buf,
2231 const jsmntok_t *result,
2232 struct xpay_params *params)
2233{
2234 const char *inv;
2235
2236 inv = json_strdup(tmpctx, buf, json_get_member(buf, result, "invoice"));
2237 inv = to_canonical_invstr(NULL, inv);
2238 return xpay_core(cmd, take(inv),
2239 NULL, params->maxfee, params->layers,
2240 params->retryfor, params->partial, params->maxdelay,
2241 params->label, NULL, false, false,
2242 params->includefees_msat);
2243}
2244
2245static struct command_result *
2246do_fetchinvoice(struct command *cmd, const char *offerstr, struct xpay_params *xparams)

Callers

nothing calls this directly

Calls 4

json_get_memberFunction · 0.85
xpay_coreFunction · 0.85
json_strdupFunction · 0.50
to_canonical_invstrFunction · 0.50

Tested by

no test coverage detected