(
&self,
request: tonic::Request<pb::ListfundsRequest>,
)
| 147 | } |
| 148 | |
| 149 | async fn list_funds( |
| 150 | &self, |
| 151 | request: tonic::Request<pb::ListfundsRequest>, |
| 152 | ) -> Result<tonic::Response<pb::ListfundsResponse>, tonic::Status> { |
| 153 | let req = request.into_inner(); |
| 154 | let req: requests::ListfundsRequest = req.into(); |
| 155 | debug!("Client asked for list_funds"); |
| 156 | trace!("list_funds request: {:?}", req); |
| 157 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 158 | .await |
| 159 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 160 | let result = rpc.call(Request::ListFunds(req)) |
| 161 | .await |
| 162 | .map_err(|e| Status::new( |
| 163 | Code::Unknown, |
| 164 | format!("Error calling method ListFunds: {:?}", e)))?; |
| 165 | match result { |
| 166 | Response::ListFunds(r) => { |
| 167 | trace!("list_funds response: {:?}", r); |
| 168 | Ok(tonic::Response::new(r.into())) |
| 169 | }, |
| 170 | r => Err(Status::new( |
| 171 | Code::Internal, |
| 172 | format!( |
| 173 | "Unexpected result {:?} to method call ListFunds", |
| 174 | r |
| 175 | ) |
| 176 | )), |
| 177 | } |
| 178 | |
| 179 | } |
| 180 | |
| 181 | async fn send_pay( |
| 182 | &self, |
nothing calls this directly
no test coverage detected