| 839 | } |
| 840 | |
| 841 | static struct command_result * |
| 842 | preapproveinvoice_succeed(struct command *cmd, |
| 843 | const char *method, |
| 844 | const char *buf, |
| 845 | const jsmntok_t *result, |
| 846 | struct payment *p) |
| 847 | { |
| 848 | /* Now we can conclude `check` command */ |
| 849 | if (command_check_only(cmd)) { |
| 850 | return command_check_done(cmd); |
| 851 | } |
| 852 | |
| 853 | /* Blinded path which starts at us needs decryption. */ |
| 854 | if (p->blindedpath && node_id_eq(p->route_destination, &my_id)) { |
| 855 | struct out_req *req; |
| 856 | |
| 857 | req = jsonrpc_request_start(cmd, "decryptencrypteddata", |
| 858 | decrypt_done, forward_error, p); |
| 859 | |
| 860 | json_add_hex_talarr(req->js, "encrypted_data", |
| 861 | p->blindedpath->path[0]->encrypted_recipient_data); |
| 862 | json_add_pubkey(req->js, "path_key", &p->blindedpath->first_path_key); |
| 863 | return send_outreq(req); |
| 864 | } |
| 865 | |
| 866 | return start_payment(cmd, p); |
| 867 | } |
| 868 | static struct command_result *json_pay(struct command *cmd, |
| 869 | const char *buf, |
| 870 | const jsmntok_t *params) |
nothing calls this directly
no test coverage detected