| 2377 | } |
| 2378 | |
| 2379 | static struct command_result * |
| 2380 | do_fetchinvoice(struct command *cmd, const char *offerstr, struct xpay_params *xparams) |
| 2381 | { |
| 2382 | struct out_req *req; |
| 2383 | |
| 2384 | req = jsonrpc_request_start(cmd, "fetchinvoice", |
| 2385 | invoice_fetched, |
| 2386 | forward_error, |
| 2387 | xparams); |
| 2388 | json_add_string(req->js, "offer", offerstr); |
| 2389 | if (xparams->msat) |
| 2390 | json_add_amount_msat(req->js, "amount_msat", *xparams->msat); |
| 2391 | if (xparams->bip353) |
| 2392 | json_add_string(req->js, "bip353", xparams->bip353); |
| 2393 | if (xparams->payer_note) |
| 2394 | json_add_string(req->js, "payer_note", xparams->payer_note); |
| 2395 | |
| 2396 | return send_outreq(req); |
| 2397 | } |
| 2398 | |
| 2399 | static struct command_result * |
| 2400 | bip353_fetched(struct command *cmd, |
no test coverage detected