(
&self,
request: tonic::Request<pb::WaitinvoiceRequest>,
)
| 1268 | } |
| 1269 | |
| 1270 | async fn wait_invoice( |
| 1271 | &self, |
| 1272 | request: tonic::Request<pb::WaitinvoiceRequest>, |
| 1273 | ) -> Result<tonic::Response<pb::WaitinvoiceResponse>, tonic::Status> { |
| 1274 | let req = request.into_inner(); |
| 1275 | let req: requests::WaitinvoiceRequest = req.try_into()?; |
| 1276 | debug!("Client asked for wait_invoice"); |
| 1277 | trace!("wait_invoice request: {:?}", req); |
| 1278 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 1279 | .await |
| 1280 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 1281 | let result = rpc.call(Request::WaitInvoice(req)) |
| 1282 | .await |
| 1283 | .map_err(|e| Status::new( |
| 1284 | Code::Unknown, |
| 1285 | format!("Error calling method WaitInvoice: {:?}", e)))?; |
| 1286 | match result { |
| 1287 | Response::WaitInvoice(r) => { |
| 1288 | trace!("wait_invoice response: {:?}", r); |
| 1289 | Ok(tonic::Response::new(r.into())) |
| 1290 | }, |
| 1291 | r => Err(Status::new( |
| 1292 | Code::Internal, |
| 1293 | format!( |
| 1294 | "Unexpected result {:?} to method call WaitInvoice", |
| 1295 | r |
| 1296 | ) |
| 1297 | )), |
| 1298 | } |
| 1299 | |
| 1300 | } |
| 1301 | |
| 1302 | async fn wait_send_pay( |
| 1303 | &self, |
nothing calls this directly
no test coverage detected