(
&self,
request: tonic::Request<pb::SendamountRequest>,
)
| 4856 | } |
| 4857 | |
| 4858 | async fn send_amount( |
| 4859 | &self, |
| 4860 | request: tonic::Request<pb::SendamountRequest>, |
| 4861 | ) -> Result<tonic::Response<pb::SendamountResponse>, tonic::Status> { |
| 4862 | let req = request.into_inner(); |
| 4863 | let req: requests::SendamountRequest = req.try_into()?; |
| 4864 | debug!("Client asked for send_amount"); |
| 4865 | trace!("send_amount request: {:?}", req); |
| 4866 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 4867 | .await |
| 4868 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 4869 | let result = rpc.call(Request::SendAmount(req)) |
| 4870 | .await |
| 4871 | .map_err(|e| Status::new( |
| 4872 | Code::Unknown, |
| 4873 | format!("Error calling method SendAmount: {:?}", e)))?; |
| 4874 | match result { |
| 4875 | Response::SendAmount(r) => { |
| 4876 | trace!("send_amount response: {:?}", r); |
| 4877 | Ok(tonic::Response::new(r.into())) |
| 4878 | }, |
| 4879 | r => Err(Status::new( |
| 4880 | Code::Internal, |
| 4881 | format!( |
| 4882 | "Unexpected result {:?} to method call SendAmount", |
| 4883 | r |
| 4884 | ) |
| 4885 | )), |
| 4886 | } |
| 4887 | |
| 4888 | } |
| 4889 | |
| 4890 | async fn create_proof( |
| 4891 | &self, |
nothing calls this directly
no test coverage detected