(
&self,
request: tonic::Request<pb::InvoicerequestRequest>,
)
| 883 | } |
| 884 | |
| 885 | async fn create_invoice_request( |
| 886 | &self, |
| 887 | request: tonic::Request<pb::InvoicerequestRequest>, |
| 888 | ) -> Result<tonic::Response<pb::InvoicerequestResponse>, tonic::Status> { |
| 889 | let req = request.into_inner(); |
| 890 | let req: requests::InvoicerequestRequest = req.into(); |
| 891 | debug!("Client asked for create_invoice_request"); |
| 892 | trace!("create_invoice_request request: {:?}", req); |
| 893 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 894 | .await |
| 895 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 896 | let result = rpc.call(Request::InvoiceRequest(req)) |
| 897 | .await |
| 898 | .map_err(|e| Status::new( |
| 899 | Code::Unknown, |
| 900 | format!("Error calling method InvoiceRequest: {:?}", e)))?; |
| 901 | match result { |
| 902 | Response::InvoiceRequest(r) => { |
| 903 | trace!("create_invoice_request response: {:?}", r); |
| 904 | Ok(tonic::Response::new(r.into())) |
| 905 | }, |
| 906 | r => Err(Status::new( |
| 907 | Code::Internal, |
| 908 | format!( |
| 909 | "Unexpected result {:?} to method call InvoiceRequest", |
| 910 | r |
| 911 | ) |
| 912 | )), |
| 913 | } |
| 914 | |
| 915 | } |
| 916 | |
| 917 | async fn disable_invoice_request( |
| 918 | &self, |
nothing calls this directly
no test coverage detected