| 2243 | } |
| 2244 | |
| 2245 | static struct command_result * |
| 2246 | do_fetchinvoice(struct command *cmd, const char *offerstr, struct xpay_params *xparams) |
| 2247 | { |
| 2248 | struct out_req *req; |
| 2249 | |
| 2250 | req = jsonrpc_request_start(cmd, "fetchinvoice", |
| 2251 | invoice_fetched, |
| 2252 | forward_error, |
| 2253 | xparams); |
| 2254 | json_add_string(req->js, "offer", offerstr); |
| 2255 | if (xparams->msat) |
| 2256 | json_add_amount_msat(req->js, "amount_msat", *xparams->msat); |
| 2257 | if (xparams->bip353) |
| 2258 | json_add_string(req->js, "bip353", xparams->bip353); |
| 2259 | if (xparams->payer_note) |
| 2260 | json_add_string(req->js, "payer_note", xparams->payer_note); |
| 2261 | |
| 2262 | return send_outreq(req); |
| 2263 | } |
| 2264 | |
| 2265 | static struct command_result * |
| 2266 | bip353_fetched(struct command *cmd, |
no test coverage detected